mirror of
https://github.com/kodjodevf/mangayomi-extensions.git
synced 2026-02-14 10:51:17 +00:00
-
This commit is contained in:
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 3.6 KiB |
@@ -1,132 +0,0 @@
|
||||
import '../../../../../model/source.dart';
|
||||
|
||||
const _batotoVersion = "0.0.75";
|
||||
const _batotoSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/src/all/batoto/batoto.dart";
|
||||
|
||||
String _iconUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/src/all/batoto/icon.png";
|
||||
const _baseUrl = 'https://bato.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: 'Bato.to',
|
||||
baseUrl: _baseUrl,
|
||||
lang: e,
|
||||
typeSource: "bato.to",
|
||||
iconUrl: _iconUrl,
|
||||
dateFormat: "MMM dd,yyyy",
|
||||
isNsfw: _isNsfw,
|
||||
dateFormatLocale: "en",
|
||||
version: _batotoVersion,
|
||||
sourceCodeUrl: _batotoSourceCodeUrl))
|
||||
.toList();
|
||||
@@ -15,7 +15,7 @@ class MangaDex extends MProvider {
|
||||
Future<MPages> getPopular(int page) async {
|
||||
page = (20 * (page - 1));
|
||||
final url =
|
||||
"https://api.mangadex.org/manga?limit=20&offset=$page&availableTranslatedLanguage[]=${source.lang}&includes[]=cover_art${preferenceContentRating(source.id)}${preferenceOriginalLanguages(source.id)}&order[followedCount]=desc";
|
||||
"https://api.mangadex.org/manga?limit=20&offset=$page&availableTranslatedLanguage[]=${source.lang}&includes[]=cover_art&contentRating[]=safe&contentRating[]=suggestive${preferenceOriginalLanguages(source.id)}&order[followedCount]=desc";
|
||||
final res = (await client.get(Uri.parse(url), headers: headers)).body;
|
||||
return mangaRes(res);
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class MangaDex extends MProvider {
|
||||
mangaIdss += "&ids[]=$id";
|
||||
}
|
||||
final newUrl =
|
||||
"https://api.mangadex.org/manga?includes[]=cover_art&limit=${mangaIds.length}${preferenceContentRating(source.id)}${preferenceOriginalLanguages(source.id)}$mangaIdss";
|
||||
"https://api.mangadex.org/manga?includes[]=cover_art&limit=${mangaIds.length}&contentRating[]=safe&contentRating[]=suggestive${preferenceOriginalLanguages(source.id)}$mangaIdss";
|
||||
final res = (await client.get(Uri.parse(newUrl), headers: headers)).body;
|
||||
return mangaRes(res);
|
||||
}
|
||||
@@ -521,27 +521,6 @@ class MangaDex extends MProvider {
|
||||
valueIndex: 0,
|
||||
entries: ["Original", "Medium", "Low"],
|
||||
entryValues: ["", ".512.jpg", ".256.jpg"]),
|
||||
MultiSelectListPreference(
|
||||
key: "content_rating",
|
||||
title: "Default content rating",
|
||||
summary: "Show content with the selected rating by default",
|
||||
valueIndex: 0,
|
||||
entries: [
|
||||
"safe",
|
||||
"suggestive",
|
||||
"erotica",
|
||||
"pornographic"
|
||||
],
|
||||
entryValues: [
|
||||
"contentRating[]=safe",
|
||||
"contentRating[]=suggestive",
|
||||
"contentRating[]=erotica",
|
||||
"contentRating[]=pornographic"
|
||||
],
|
||||
values: [
|
||||
"contentRating[]=safe",
|
||||
"contentRating[]=suggestive"
|
||||
]),
|
||||
MultiSelectListPreference(
|
||||
key: "original_languages",
|
||||
title: "Filter original languages",
|
||||
@@ -572,19 +551,6 @@ class MangaDex extends MProvider {
|
||||
];
|
||||
}
|
||||
|
||||
String preferenceContentRating(int sourceId) {
|
||||
final contentRating =
|
||||
getPreferenceValue(sourceId, "content_rating") as List<String>;
|
||||
String contentRatingStr = "";
|
||||
if (contentRating.isNotEmpty) {
|
||||
contentRatingStr = "&";
|
||||
for (var ctn in contentRating) {
|
||||
contentRatingStr += "&$ctn";
|
||||
}
|
||||
}
|
||||
return contentRatingStr;
|
||||
}
|
||||
|
||||
String preferenceOriginalLanguages(int sourceId) {
|
||||
final originalLanguages =
|
||||
getPreferenceValue(sourceId, "original_languages") as List<String>;
|
||||
|
||||
@@ -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.8";
|
||||
const _mangadexVersion = "0.0.85";
|
||||
const _mangadexSourceCodeUrl =
|
||||
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/manga/src/all/mangadex/mangadex.dart";
|
||||
String _iconUrl =
|
||||
|
||||
Reference in New Issue
Block a user