add imageUrl for getDetail

This commit is contained in:
Schnitzel5 2024-09-25 17:03:29 +02:00
parent 46a8ba3266
commit a59b478d2d

View file

@ -159,6 +159,11 @@ class MangaDex extends MProvider {
headers: headers))
.body;
MManga manga = MManga();
final coverUrl = jsonPathToString(
res, r'$..data.relationships[*].attributes.fileName', '');
if (coverUrl != null) {
manga.imageUrl = "https://uploads.mangadex.org/covers/${url.replaceAll("/manga/", "")}/${coverUrl}.256.jpg";
}
manga.author = jsonPathToString(
res, r'$..data.relationships[*].attributes.name', ', ');