mangadex : fix chapterdate null value

This commit is contained in:
kodjomoustapha
2023-07-10 14:53:24 +01:00
parent 1e7bdda98a
commit f3e3e209e0
3 changed files with 1740 additions and 7 deletions

1713
index.json

File diff suppressed because one or more lines are too long

View File

@@ -16,6 +16,7 @@ getPopularManga(MangaModel manga) async {
if (res.isEmpty) {
return manga;
}
List<String> data = MBridge.listParse(
MBridge.jsonPathToString(res, r'$.data[*]', '_.').split("_."), 0);
List<String> urlList = [];
@@ -188,8 +189,10 @@ getMangaDetail(MangaModel manga) async {
List<String> scanlators = [];
List<String> chapterUrl = [];
List<String> chapterDate = [];
final list = getChapters(
manga, MBridge.intParse("${chapterList.length}"), paginatedChapterList);
chapterListA.add(list);
var hasMoreResults = (limit + offset) < total;
while (hasMoreResults) {
@@ -207,16 +210,35 @@ getMangaDetail(MangaModel manga) async {
hasMoreResults = (limit + offset) < total;
}
for (var element in chapterListA) {
int index = 0;
for (var name in element.names) {
if (name.isEmpty) {
} else {
chapNames.add(name);
chapterUrl.add(element.urls[index]);
chapterDate.add(element.chaptersDateUploads[index]);
scanlators.add(element.chaptersScanlators[index]);
}
index++;
}
}
for (var element in chapterListA) {
for (var url in element.urls) {
if (url.isEmpty) {
} else {
chapterUrl.add(url);
}
}
}
for (var element in chapterListA) {
for (var chapDate in element.chaptersDateUploads) {
if (chapDate.isEmpty) {
} else {
chapterDate.add(chapDate);
}
}
}
for (var element in chapterListA) {
for (var scanlator in element.chaptersScanlators) {
if (scanlator.isEmpty) {
} else {
scanlators.add(scanlator);
}
}
}
manga.urls = chapterUrl;

View File

@@ -3,7 +3,7 @@ import '../../../model/source.dart';
const apiUrl = 'https://api.mangadex.org';
const baseUrl = 'https://mangadex.org';
const isNsfw = true;
const mangadexVersion = "0.0.1";
const mangadexVersion = "0.0.11";
const mangadexSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/src/all/mangadex/mangadex-v$mangadexVersion.dart";
const iconUrl = '';