[mangadex] use '/manga' endpoint to get manga by author (#6372)

allows for more than 10 manga to be returned
This commit is contained in:
Mike Fährmann
2024-10-24 19:16:32 +02:00
parent 0fd98f67ba
commit d34e2d56aa
2 changed files with 18 additions and 15 deletions

View File

@@ -182,13 +182,10 @@ class MangadexAuthorExtractor(MangadexExtractor):
"/01234567-89ab-cdef-0123-456789abcdef/NAME")
def items(self):
author = self.api.author(self.uuid)
author["_extractor"] = MangadexMangaExtractor
for item in author["relationships"]:
if item["type"] == "manga":
url = "{}/title/{}".format(self.root, item["id"])
yield Message.Queue, url, author
for manga in self.api.manga_author(self.uuid):
manga["_extractor"] = MangadexMangaExtractor
url = "{}/title/{}".format(self.root, manga["id"])
yield Message.Queue, url, manga
class MangadexAPI():
@@ -231,6 +228,10 @@ class MangadexAPI():
params = {"includes[]": ("artist", "author")}
return self._call("/manga/" + uuid, params)["data"]
def manga_author(self, uuid_author):
params = {"authorOrArtist": uuid_author}
return self._pagination("/manga", params)
def manga_feed(self, uuid):
order = "desc" if self.extractor.config("chapter-reverse") else "asc"
params = {