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

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