mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 19:01:15 +00:00
New source (multi Batoto), some code refactor
This commit is contained in:
217
manga/src/all/batoto/batoto-v0.0.1.dart
Normal file
217
manga/src/all/batoto/batoto-v0.0.1.dart
Normal file
@@ -0,0 +1,217 @@
|
||||
import 'dart:convert';
|
||||
import 'package:bridge_lib/bridge_lib.dart';
|
||||
|
||||
getPopularManga(MangaModel manga) async {
|
||||
final lang = manga.lang.replaceAll("-", "_");
|
||||
final url =
|
||||
"${manga.baseUrl}/browse?langs=$lang&sort=views_a&page=${manga.page}";
|
||||
final data = {"url": url, "headers": null, "sourceId": manga.sourceId};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
return mangaElementM(res, manga);
|
||||
}
|
||||
|
||||
getLatestUpdatesManga(MangaModel manga) async {
|
||||
final lang = manga.lang.replaceAll("-", "_");
|
||||
final url =
|
||||
"${manga.baseUrl}/browse?langs=$lang&sort=update&page=${manga.page}";
|
||||
final data = {"url": url, "headers": null, "sourceId": manga.sourceId};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
return mangaElementM(res, manga);
|
||||
}
|
||||
|
||||
searchManga(MangaModel manga) async {
|
||||
final data = {
|
||||
"url": "${manga.baseUrl}/search?word=${manga.query}&page=${manga.page}",
|
||||
"headers": null,
|
||||
"sourceId": manga.sourceId
|
||||
};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
return mangaElementM(res, manga);
|
||||
}
|
||||
|
||||
getMangaDetail(MangaModel manga) async {
|
||||
final statusList = [
|
||||
{
|
||||
"Ongoing": 0,
|
||||
"Completed": 1,
|
||||
"Cancelled": 3,
|
||||
"Hiatus": 2,
|
||||
}
|
||||
];
|
||||
|
||||
final url = "${manga.baseUrl}${manga.link}";
|
||||
final data = {"url": url, "headers": null, "sourceId": manga.sourceId};
|
||||
final res = await MBridge.http(json.encode(data), 0);
|
||||
|
||||
if (res.isEmpty) {
|
||||
return manga;
|
||||
}
|
||||
|
||||
final workStatus = MBridge.xpath(
|
||||
res,
|
||||
'//*[@class="attr-item"]/b[contains(text(),"Original work")]/following-sibling::span[1]/text()',
|
||||
'');
|
||||
manga.status = MBridge.parseStatus(workStatus, statusList);
|
||||
|
||||
manga.author = MBridge.xpath(
|
||||
res,
|
||||
'//*[@class="attr-item"]/b[contains(text(),"Authors")]/following-sibling::span[1]/text()',
|
||||
'');
|
||||
manga.genre = MBridge.xpath(
|
||||
res,
|
||||
'//*[@class="attr-item"]/b[contains(text(),"Genres")]/following-sibling::span[1]/text()',
|
||||
'')
|
||||
.split(",");
|
||||
manga.description = MBridge.xpath(res, '//*[@class="limit-html"]/text()', '');
|
||||
|
||||
List<String> chapsElement =
|
||||
MBridge.querySelectorAll(res, "div.main div.p-2", 2, "", 0, 0, '-.')
|
||||
.split('-.');
|
||||
List<String> times = [];
|
||||
List<String> chapsUrls = [];
|
||||
List<String> chapsNames = [];
|
||||
List<String> scanlators = [];
|
||||
for (var element in MBridge.listParse(chapsElement, 0)) {
|
||||
final urlElement = MBridge.querySelector(element, "a.chapt", 2, "");
|
||||
final group = MBridge.xpath(element, '//*[@class="extra"]/a/text()', '');
|
||||
final name = MBridge.xpath(urlElement, '//a/text()', '');
|
||||
final url = MBridge.xpath(urlElement, '//a/@href', '');
|
||||
final time = MBridge.xpath(
|
||||
element, '//*[@class="extra"]/i[@class="ps-3"]/text()', '');
|
||||
times.add(time);
|
||||
chapsUrls.add(url);
|
||||
scanlators.add(group);
|
||||
chapsNames.add(name.replaceAll("\n ", "").replaceAll(" ", ""));
|
||||
}
|
||||
|
||||
manga.urls = chapsUrls;
|
||||
manga.names = chapsNames;
|
||||
manga.chaptersScanlators = scanlators;
|
||||
manga.chaptersDateUploads = MBridge.listParse(
|
||||
MBridge.listParseDateTime(times, "MMM dd,yyyy", "en"), 0);
|
||||
|
||||
return manga;
|
||||
}
|
||||
|
||||
getChapterUrl(MangaModel manga) async {
|
||||
final datas = {
|
||||
"url": "${manga.baseUrl}${manga.link}",
|
||||
"headers": null,
|
||||
"sourceId": manga.sourceId
|
||||
};
|
||||
final res = await MBridge.http(json.encode(datas), 0);
|
||||
if (res.isEmpty) {
|
||||
return [];
|
||||
}
|
||||
final script = MBridge.xpath(
|
||||
res,
|
||||
'//script[contains(text(), "imgHttpLis") and contains(text(), "batoWord") and contains(text(), "batoPass")]/text()',
|
||||
"");
|
||||
final imgHttpLisString = MBridge.subString(
|
||||
MBridge.subString(script, 'const imgHttpLis =', 2), ';', 0);
|
||||
List<String> imgHttpLis = MBridge.jsonDecodeToList(imgHttpLisString, 0);
|
||||
final batoWord = MBridge.subString(
|
||||
MBridge.subString(script, 'const batoWord =', 2), ';', 0);
|
||||
final batoPass = MBridge.subString(
|
||||
MBridge.subString(script, 'const batoPass =', 2), ';', 0);
|
||||
final evaluatedPass = MBridge.deobfuscateJsPassword(batoPass);
|
||||
final imgAccListString =
|
||||
MBridge.decryptAESCryptoJS(batoWord.replaceAll('"', ""), evaluatedPass);
|
||||
List<String> imgAccList = MBridge.jsonDecodeToList(imgAccListString, 0);
|
||||
List<String> pagesUrl = [];
|
||||
for (int i = 0; i < imgHttpLis.length; i++) {
|
||||
final imgUrl = MBridge.listParse(imgHttpLis, 0)[i];
|
||||
final imgAcc = MBridge.listParse(imgAccList, 0)[i];
|
||||
pagesUrl.add("$imgUrl?$imgAcc");
|
||||
}
|
||||
|
||||
return pagesUrl;
|
||||
}
|
||||
|
||||
MangaModel mangaElementM(String res, MangaModel manga) async {
|
||||
if (res.isEmpty) {
|
||||
return manga;
|
||||
}
|
||||
final lang = manga.lang.replaceAll("-", "_");
|
||||
List<String> resB = MBridge.querySelectorAll(
|
||||
res, "div#series-list div.col", 2, "", 0, 0, '-.')
|
||||
.split('-.');
|
||||
List<String> images = [];
|
||||
List<String> urls = [];
|
||||
List<String> names = [];
|
||||
|
||||
for (var element in MBridge.listParse(resB, 0)) {
|
||||
if (manga.lang == "all") {
|
||||
final item = MBridge.querySelector(element, "a.item-cover", 2, "");
|
||||
final img = MBridge.querySelector(item, "img", 3, "src");
|
||||
final url = MBridge.querySelector(item, "a", 3, "href");
|
||||
images.add(img);
|
||||
urls.add(url);
|
||||
final title = MBridge.querySelector(element, "a.item-title", 0, "");
|
||||
names.add(title);
|
||||
} else if (manga.lang == "en") {
|
||||
if (element.contains('no-flag')) {
|
||||
final item = MBridge.querySelector(element, "a.item-cover", 2, "");
|
||||
final img = MBridge.querySelector(item, "img", 3, "src");
|
||||
final url = MBridge.querySelector(item, "a", 3, "href");
|
||||
images.add(img);
|
||||
urls.add(url);
|
||||
final title = MBridge.querySelector(element, "a.item-title", 0, "");
|
||||
names.add(title);
|
||||
}
|
||||
} else {
|
||||
if (element.contains('data-lang="$lang"')) {
|
||||
final item = MBridge.querySelector(element, "a.item-cover", 2, "");
|
||||
final img = MBridge.querySelector(item, "img", 3, "src");
|
||||
final url = MBridge.querySelector(item, "a", 3, "href");
|
||||
images.add(img);
|
||||
urls.add(url);
|
||||
final title = MBridge.querySelector(element, "a.item-title", 0, "");
|
||||
names.add(title);
|
||||
}
|
||||
}
|
||||
}
|
||||
manga.urls = urls;
|
||||
manga.names = names;
|
||||
manga.images = images;
|
||||
final nextPage = MBridge.xpath(
|
||||
res,
|
||||
'//li[@class="page-item disabled"]/a/span[contains(text(),"»")]/text()',
|
||||
"");
|
||||
if (nextPage.isEmpty) {
|
||||
manga.hasNextPage = true;
|
||||
} else {
|
||||
manga.hasNextPage = false;
|
||||
}
|
||||
return manga;
|
||||
}
|
||||
|
||||
Map<String, String> getMirrorPref() {
|
||||
return {
|
||||
"bato.to": "https://bato.to",
|
||||
"batocomic.com": "https://batocomic.com",
|
||||
"batocomic.net": "https://batocomic.net",
|
||||
"batocomic.org": "https://batocomic.org",
|
||||
"batotoo.com": "https://batotoo.com",
|
||||
"batotwo.com": "https://batotwo.com",
|
||||
"battwo.com": "https://battwo.com",
|
||||
"comiko.net": "https://comiko.net",
|
||||
"comiko.org": "https://comiko.org",
|
||||
"mangatoto.com": "https://mangatoto.com",
|
||||
"mangatoto.net": "https://mangatoto.net",
|
||||
"mangatoto.org": "https://mangatoto.org",
|
||||
"readtoto.com": "https://readtoto.com",
|
||||
"readtoto.net": "https://readtoto.net",
|
||||
"readtoto.org": "https://readtoto.org",
|
||||
"dto.to": "https://dto.to",
|
||||
"hto.to": "https://hto.to",
|
||||
"mto.to": "https://mto.to",
|
||||
"wto.to": "https://wto.to",
|
||||
"xbato.com": "https://xbato.com",
|
||||
"xbato.net": "https://xbato.net",
|
||||
"xbato.org": "https://xbato.org",
|
||||
"zbato.com": "https://zbato.com",
|
||||
"zbato.net": "https://zbato.net",
|
||||
"zbato.org": "https://zbato.org",
|
||||
};
|
||||
}
|
||||
133
manga/src/all/batoto/sources.dart
Normal file
133
manga/src/all/batoto/sources.dart
Normal file
@@ -0,0 +1,133 @@
|
||||
import '../../../../model/source.dart';
|
||||
import '../../../../utils/utils.dart';
|
||||
|
||||
const batotoVersion = "0.0.1";
|
||||
const batotoSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/batoto/batoto-v$batotoVersion.dart";
|
||||
|
||||
String _iconUrl = getIconUrl("batoto", "all");
|
||||
const baseUrl = 'https://batoto.to';
|
||||
const isNsfw = true;
|
||||
|
||||
List<String> languages = [
|
||||
"all",
|
||||
"en",
|
||||
"ar",
|
||||
"bg",
|
||||
"zh",
|
||||
"cs",
|
||||
"da",
|
||||
"nl",
|
||||
"fil",
|
||||
"fi",
|
||||
"fr",
|
||||
"de",
|
||||
"el",
|
||||
"he",
|
||||
"hi",
|
||||
"hu",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"ko",
|
||||
"ms",
|
||||
"pl",
|
||||
"pt",
|
||||
"pt-br",
|
||||
"ro",
|
||||
"ru",
|
||||
"es",
|
||||
"es-419",
|
||||
"sv",
|
||||
"th",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi",
|
||||
"af",
|
||||
"sq",
|
||||
"am",
|
||||
"hy",
|
||||
"az",
|
||||
"be",
|
||||
"bn",
|
||||
"bs",
|
||||
"my",
|
||||
"km",
|
||||
"ca",
|
||||
"ceb",
|
||||
"zh-hk",
|
||||
"zh-tw",
|
||||
"hr",
|
||||
"en-us",
|
||||
"eo",
|
||||
"et",
|
||||
"fo",
|
||||
"ka",
|
||||
"gn",
|
||||
"gu",
|
||||
"ht",
|
||||
"ha",
|
||||
"is",
|
||||
"ig",
|
||||
"ga",
|
||||
"jv",
|
||||
"kn",
|
||||
"kk",
|
||||
"ku",
|
||||
"ky",
|
||||
"lo",
|
||||
"lv",
|
||||
"lt",
|
||||
"lb",
|
||||
"mk",
|
||||
"mg",
|
||||
"ml",
|
||||
"mt",
|
||||
"mi",
|
||||
"mr",
|
||||
"mn",
|
||||
"ne",
|
||||
"no",
|
||||
"ny",
|
||||
"ps",
|
||||
"fa",
|
||||
"rm",
|
||||
"sm",
|
||||
"sr",
|
||||
"sh",
|
||||
"st",
|
||||
"sn",
|
||||
"sd",
|
||||
"si",
|
||||
"sk",
|
||||
"sl",
|
||||
"so",
|
||||
"sw",
|
||||
"tg",
|
||||
"ta",
|
||||
"ti",
|
||||
"to",
|
||||
"tk",
|
||||
"ur",
|
||||
"uz",
|
||||
"yo",
|
||||
"zu",
|
||||
"eu",
|
||||
"pt-PT",
|
||||
];
|
||||
|
||||
List<Source> get batotoSourcesList => _batotoSourcesList;
|
||||
List<Source> _batotoSourcesList = languages
|
||||
.map((e) => Source(
|
||||
name: 'Batoto',
|
||||
baseUrl: baseUrl,
|
||||
lang: e,
|
||||
typeSource: "batoto",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "MMM dd,yyyy",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: "en",
|
||||
version: batotoVersion,
|
||||
appMinVerReq: "0.0.43",
|
||||
sourceCodeUrl: batotoSourceCodeUrl))
|
||||
.toList();
|
||||
@@ -5,217 +5,67 @@ const comickVersion = "0.0.11";
|
||||
const comickSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/comick/comick-v$comickVersion.dart";
|
||||
|
||||
const defaultDateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'";
|
||||
const defaultDateFormatLocale = "en";
|
||||
|
||||
String iconUrl = getIconUrl("comickfun", "all");
|
||||
const apiUrl = 'https://api.comick.fun';
|
||||
const baseUrl = 'https://comick.app';
|
||||
const isNsfw = true;
|
||||
List<Source> get comickSourcesList => _comickSourcesList;
|
||||
List<Source> _comickSourcesList = [
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'en',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'ar',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'pt',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'pt-br',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'it',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'ru',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'es',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'es-419',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'id',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'hi',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'de',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'ja',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'tr',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'pl',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'zh',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'zh-hk',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'fr',
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: defaultDateFormat,
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: defaultDateFormatLocale,
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl),
|
||||
|
||||
List<String> languages = [
|
||||
"all",
|
||||
"en",
|
||||
"pt-br",
|
||||
"ru",
|
||||
"fr",
|
||||
"es-419",
|
||||
"pl",
|
||||
"tr",
|
||||
"it",
|
||||
"es",
|
||||
"id",
|
||||
"hu",
|
||||
"vi",
|
||||
"zh-hk",
|
||||
"ar",
|
||||
"de",
|
||||
"zh",
|
||||
"ca",
|
||||
"bg",
|
||||
"th",
|
||||
"fa",
|
||||
"uk",
|
||||
"mn",
|
||||
"ro",
|
||||
"he",
|
||||
"ms",
|
||||
"tl",
|
||||
"ja",
|
||||
"hi",
|
||||
"my",
|
||||
"ko",
|
||||
"cs",
|
||||
"pt",
|
||||
"nl",
|
||||
"sv",
|
||||
"bn",
|
||||
"no",
|
||||
"lt",
|
||||
"el",
|
||||
"sr",
|
||||
"da",
|
||||
];
|
||||
|
||||
List<Source> get comickSourcesList => _comickSourcesList;
|
||||
List<Source> _comickSourcesList = languages
|
||||
.map((e) => Source(
|
||||
name: 'Comick',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: e,
|
||||
typeSource: "comick",
|
||||
iconUrl: iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss'Z'",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: "en",
|
||||
version: comickVersion,
|
||||
sourceCodeUrl: comickSourceCodeUrl))
|
||||
.toList();
|
||||
|
||||
@@ -8,210 +8,67 @@ const mangadexVersion = "0.0.13";
|
||||
const mangadexSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/mangadex/mangadex-v$mangadexVersion.dart";
|
||||
String _iconUrl = getIconUrl("mangadex", "all");
|
||||
List<Source> get mangaDexSourcesList => _mangaDexSourcesList;
|
||||
List<Source> _mangaDexSourcesList = [
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'en',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'ar',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'pt',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'pt-br',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'it',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'ru',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'es',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'es-419',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'id',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'hi',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'de',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'ja',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'tr',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'pl',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'zh',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'zh-hk',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: 'fr',
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl),
|
||||
|
||||
final languages = [
|
||||
"ar",
|
||||
"bn",
|
||||
"bg",
|
||||
"my",
|
||||
"ca",
|
||||
"zh",
|
||||
"zh-hk",
|
||||
"cs",
|
||||
"da",
|
||||
"nl",
|
||||
"en",
|
||||
"tl",
|
||||
"fi",
|
||||
"fr",
|
||||
"de",
|
||||
"el",
|
||||
"he",
|
||||
"hi",
|
||||
"hu",
|
||||
"id",
|
||||
"it",
|
||||
"ja",
|
||||
"kk",
|
||||
"ko",
|
||||
"la",
|
||||
"lt",
|
||||
"ms",
|
||||
"mn",
|
||||
"ne",
|
||||
"no",
|
||||
"fa",
|
||||
"pl",
|
||||
"pt-br",
|
||||
"pt",
|
||||
"ro",
|
||||
"ru",
|
||||
"sh",
|
||||
"es-419",
|
||||
"es",
|
||||
"sv",
|
||||
"ta",
|
||||
"th",
|
||||
"tr",
|
||||
"uk",
|
||||
"vi"
|
||||
];
|
||||
|
||||
List<Source> get mangaDexSourcesList => _mangaDexSourcesList;
|
||||
List<Source> _mangaDexSourcesList = languages
|
||||
.map((e) => Source(
|
||||
name: 'MangaDex',
|
||||
apiUrl: apiUrl,
|
||||
baseUrl: baseUrl,
|
||||
lang: e,
|
||||
typeSource: "mangadex",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS",
|
||||
isNsfw: isNsfw,
|
||||
dateFormatLocale: 'en_Us',
|
||||
version: mangadexVersion,
|
||||
sourceCodeUrl: mangadexSourceCodeUrl))
|
||||
.toList();
|
||||
|
||||
Reference in New Issue
Block a user