mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-15 11:21:11 +00:00
New source (multi Batoto), some code refactor
This commit is contained in:
@@ -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