This commit is contained in:
kodjomoustapha
2023-08-27 14:11:46 +01:00
parent 7249635f3a
commit 1a8dac5709
3 changed files with 21 additions and 22 deletions

File diff suppressed because one or more lines are too long

View File

@@ -2,9 +2,8 @@ import 'package:bridge_lib/bridge_lib.dart';
import 'dart:convert';
String getMDXContentRating() {
String ctnRating = MBridge.stringParse(
"&contentRating[]=suggestive&contentRating[]=safe&contentRating[]=erotica&contentRating[]=pornographic",
0);
String ctnRating =
"&contentRating[]=suggestive&contentRating[]=safe&contentRating[]=erotica&contentRating[]=pornographic";
return ctnRating;
}
@@ -39,35 +38,35 @@ getPopularManga(MangaModel manga) async {
MangaModel getChapters(
MangaModel manga, int length, String paginatedChapterListA) {
String scanlators = MBridge.stringParse("", 0);
String chapNames = MBridge.stringParse("", 0);
String chapDate = MBridge.stringParse("", 0);
String chapterUrl = MBridge.stringParse("", 0);
String paginatedChapterList = MBridge.stringParse(paginatedChapterListA, 0);
String scanlators = "".toString();
String chapNames = "".toString();
String chapDate = "".toString();
String chapterUrl = "".toString();
String paginatedChapterList = paginatedChapterListA.toString();
final dataList =
MBridge.jsonPathToList(paginatedChapterList, r'$.data[*]', 0);
for (var res in dataList) {
String scan = MBridge.stringParse("", 0);
String scan = "".toString();
final groups = MBridge.jsonPathToList(res,
r'$.relationships[?@.id!="00e03853-1b96-4f41-9542-c71b8692033b"]', 0);
String chapName = MBridge.stringParse("", 0);
String chapName = "".toString();
for (var element in groups) {
final data = MBridge.getMapValue(element, "attributes", 1);
if (data.isEmpty) {
} else {
final name = MBridge.getMapValue(data, "name", 0);
scan += MBridge.stringParse("$name", 0);
scan += "$name".toString();
final username = MBridge.getMapValue(data, "username", 0);
if (username.isEmpty) {
} else {
if (scan.isEmpty) {
scan += MBridge.stringParse("Uploaded by $username", 0);
scan += "Uploaded by $username".toString();
}
}
}
}
if (scan.isEmpty) {
scan = MBridge.stringParse("No Group", 0);
scan = "No Group".toString();
}
final dataRes = MBridge.getMapValue(res, "attributes", 1);
if (dataRes.isEmpty) {
@@ -78,7 +77,7 @@ MangaModel getChapters(
} else {
if (volume == "null") {
} else {
chapName = MBridge.stringParse("Vol.$volume ", 0);
chapName = "Vol.$volume ".toString();
}
}
final chapter = MBridge.getMapValue(data, "chapter", 0);
@@ -86,7 +85,7 @@ MangaModel getChapters(
} else {
if (chapter == "null") {
} else {
chapName += MBridge.stringParse("Ch.$chapter ", 0);
chapName += "Ch.$chapter ".toString();
}
}
final title = MBridge.getMapValue(data, "title", 0);
@@ -96,13 +95,13 @@ MangaModel getChapters(
} else {
if (chapName.isEmpty) {
} else {
chapName += MBridge.stringParse("- ", 0);
chapName += "- ".toString();
}
chapName += MBridge.stringParse("$title", 0);
chapName += "$title".toString();
}
}
if (chapName.isEmpty) {
chapName += MBridge.stringParse("Oneshot", 0);
chapName += "Oneshot".toString();
}
final date = MBridge.getMapValue(data, "publishAt", 0);
final id = MBridge.getMapValue(res, "id", 0);
@@ -263,7 +262,7 @@ getLatestUpdatesManga(MangaModel manga) async {
MBridge.jsonPathToString(ress, r'$.data[*].relationships[*].id', '.--')
.split('.--'),
3);
String mangaa = MBridge.stringParse("", 0);
String mangaa = "".toString();
for (var id in mangaIds) {
mangaa += "&ids[]=$id";
}
@@ -385,7 +384,7 @@ String getCover(String dataRes, int mangaIndex, String mangaId) {
MBridge.jsonPathToString(dataRes, expressionRelationAll, '_.')
.split("_."),
0);
String coverFileName = MBridge.stringParse("", 0);
String coverFileName = "".toString();
for (var j = 0; j < relationDatas.length; j++) {
final expressionData = MBridge.regExp(
r'$.data[a].relationships[b]', r'\[a\]', "[$mangaIndex]", 0, 1);

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.12";
const mangadexVersion = "0.0.13";
const mangadexSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/mangadex/mangadex-v$mangadexVersion.dart";
const iconUrl = 'https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/icon/mangayomi-all-mangadex.png';