New source (multi Batoto), some code refactor

This commit is contained in:
kodjomoustapha
2023-09-11 10:41:53 +01:00
parent 899ee3065a
commit 15385b40c5
7 changed files with 476 additions and 417 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

File diff suppressed because one or more lines are too long

View File

@@ -7,6 +7,7 @@ import 'multisrc/heancms/sources.dart';
import 'multisrc/madara/sources.dart'; import 'multisrc/madara/sources.dart';
import 'multisrc/mangareader/sources.dart'; import 'multisrc/mangareader/sources.dart';
import 'multisrc/mmrcms/sources.dart'; import 'multisrc/mmrcms/sources.dart';
import 'src/all/batoto/sources.dart';
import 'src/all/comick/sources.dart'; import 'src/all/comick/sources.dart';
import 'src/all/mangadex/sources.dart'; import 'src/all/mangadex/sources.dart';
import 'src/en/mangahere/source.dart'; import 'src/en/mangahere/source.dart';
@@ -19,7 +20,8 @@ void main() {
...mangareaderSourcesList, ...mangareaderSourcesList,
...mmrcmsSourcesList, ...mmrcmsSourcesList,
...heanCmsSourcesList, ...heanCmsSourcesList,
mangahereSource mangahereSource,
...batotoSourcesList
]; ];
final List<Map<String, dynamic>> jsonList = final List<Map<String, dynamic>> jsonList =
_sourcesList.map((source) => source.toJson()).toList(); _sourcesList.map((source) => source.toJson()).toList();

View 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",
};
}

View 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();

View File

@@ -5,217 +5,67 @@ const comickVersion = "0.0.11";
const comickSourceCodeUrl = const comickSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/comick/comick-v$comickVersion.dart"; "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"); String iconUrl = getIconUrl("comickfun", "all");
const apiUrl = 'https://api.comick.fun'; const apiUrl = 'https://api.comick.fun';
const baseUrl = 'https://comick.app'; const baseUrl = 'https://comick.app';
const isNsfw = true; const isNsfw = true;
List<Source> get comickSourcesList => _comickSourcesList;
List<Source> _comickSourcesList = [ List<String> languages = [
Source( "all",
name: 'Comick', "en",
apiUrl: apiUrl, "pt-br",
baseUrl: baseUrl, "ru",
lang: 'en', "fr",
typeSource: "comick", "es-419",
iconUrl: iconUrl, "pl",
dateFormat: defaultDateFormat, "tr",
isNsfw: isNsfw, "it",
dateFormatLocale: defaultDateFormatLocale, "es",
version: comickVersion, "id",
sourceCodeUrl: comickSourceCodeUrl), "hu",
Source( "vi",
name: 'Comick', "zh-hk",
apiUrl: apiUrl, "ar",
baseUrl: baseUrl, "de",
lang: 'ar', "zh",
typeSource: "comick", "ca",
iconUrl: iconUrl, "bg",
dateFormat: defaultDateFormat, "th",
isNsfw: isNsfw, "fa",
dateFormatLocale: defaultDateFormatLocale, "uk",
version: comickVersion, "mn",
sourceCodeUrl: comickSourceCodeUrl), "ro",
Source( "he",
name: 'Comick', "ms",
apiUrl: apiUrl, "tl",
baseUrl: baseUrl, "ja",
lang: 'pt', "hi",
typeSource: "comick", "my",
iconUrl: iconUrl, "ko",
dateFormat: defaultDateFormat, "cs",
isNsfw: isNsfw, "pt",
dateFormatLocale: defaultDateFormatLocale, "nl",
version: comickVersion, "sv",
sourceCodeUrl: comickSourceCodeUrl), "bn",
Source( "no",
name: 'Comick', "lt",
apiUrl: apiUrl, "el",
baseUrl: baseUrl, "sr",
lang: 'pt-br', "da",
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<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();

View File

@@ -8,210 +8,67 @@ const mangadexVersion = "0.0.13";
const mangadexSourceCodeUrl = const mangadexSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/mangadex/mangadex-v$mangadexVersion.dart"; "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/main/manga/src/all/mangadex/mangadex-v$mangadexVersion.dart";
String _iconUrl = getIconUrl("mangadex", "all"); String _iconUrl = getIconUrl("mangadex", "all");
List<Source> get mangaDexSourcesList => _mangaDexSourcesList;
List<Source> _mangaDexSourcesList = [ final languages = [
Source( "ar",
name: 'MangaDex', "bn",
apiUrl: apiUrl, "bg",
baseUrl: baseUrl, "my",
lang: 'en', "ca",
typeSource: "mangadex", "zh",
iconUrl: _iconUrl, "zh-hk",
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS", "cs",
isNsfw: isNsfw, "da",
dateFormatLocale: 'en_Us', "nl",
version: mangadexVersion, "en",
sourceCodeUrl: mangadexSourceCodeUrl), "tl",
Source( "fi",
name: 'MangaDex', "fr",
apiUrl: apiUrl, "de",
baseUrl: baseUrl, "el",
lang: 'ar', "he",
typeSource: "mangadex", "hi",
iconUrl: _iconUrl, "hu",
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS", "id",
isNsfw: isNsfw, "it",
dateFormatLocale: 'en_Us', "ja",
version: mangadexVersion, "kk",
sourceCodeUrl: mangadexSourceCodeUrl), "ko",
Source( "la",
name: 'MangaDex', "lt",
apiUrl: apiUrl, "ms",
baseUrl: baseUrl, "mn",
lang: 'pt', "ne",
typeSource: "mangadex", "no",
iconUrl: _iconUrl, "fa",
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS", "pl",
isNsfw: isNsfw, "pt-br",
dateFormatLocale: 'en_Us', "pt",
version: mangadexVersion, "ro",
sourceCodeUrl: mangadexSourceCodeUrl), "ru",
Source( "sh",
name: 'MangaDex', "es-419",
apiUrl: apiUrl, "es",
baseUrl: baseUrl, "sv",
lang: 'pt-br', "ta",
typeSource: "mangadex", "th",
iconUrl: _iconUrl, "tr",
dateFormat: "yyyy-MM-dd'T'HH:mm:ss+SSS", "uk",
isNsfw: isNsfw, "vi"
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),
]; ];
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();