fix zorotheme/AniWatch: Update Url and Name to HiAnime

This commit is contained in:
kodjomoustapha
2024-03-13 10:01:28 +01:00
parent ffb50e8a4c
commit a77225d3da
5 changed files with 45 additions and 23 deletions

View File

@@ -1,8 +1,8 @@
import '../../../model/source.dart'; import '../../../model/source.dart';
import 'src/aniwatch/aniwatch.dart'; import 'src/hianime/hianime.dart';
import 'src/kaido/kaido.dart'; import 'src/kaido/kaido.dart';
const _zorothemeVersion = "0.0.8"; const _zorothemeVersion = "0.0.85";
const _zorothemeSourceCodeUrl = const _zorothemeSourceCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/zorotheme/zorotheme.dart"; "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/zorotheme/zorotheme.dart";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

View File

@@ -3,11 +3,12 @@ import '../../../../../model/source.dart';
Source get aniwatchSource => _aniwatchSource; Source get aniwatchSource => _aniwatchSource;
Source _aniwatchSource = Source( Source _aniwatchSource = Source(
name: "AniWatch.to", id: 814067600,
baseUrl: "https://aniwatch.to", name: "HiAnime",
baseUrl: "https://hianime.to",
isManga: false, isManga: false,
lang: "en", lang: "en",
typeSource: "zorotheme", typeSource: "zorotheme",
iconUrl: iconUrl:
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/zorotheme/src/aniwatch/icon.png", "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/zorotheme/src/hianime/icon.png",
); );

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

@@ -205,7 +205,10 @@ class ZoroTheme extends MProvider {
a = await rapidCloudExtractor(epUrl, "Vidcloud - $subDub"); a = await rapidCloudExtractor(epUrl, "Vidcloud - $subDub");
} else if (name.contains("StreamTape")) { } else if (name.contains("StreamTape")) {
a = await streamTapeExtractor(epUrl, "StreamTape - $subDub"); a = await streamTapeExtractor(epUrl, "StreamTape - $subDub");
} else if (["HD-1", "HD-2"].any((element) => name.contains(element))) {
a = await rapidCloudExtractor(epUrl, "$name - $subDub");
} }
videos.addAll(a); videos.addAll(a);
} }
} }
@@ -528,27 +531,45 @@ class ZoroTheme extends MProvider {
valueIndex: 1, valueIndex: 1,
entries: ["1080p", "720p", "480p", "360p"], entries: ["1080p", "720p", "480p", "360p"],
entryValues: ["1080", "720", "480", "360"]), entryValues: ["1080", "720", "480", "360"]),
if (source.name == "HiAnime")
ListPreference(
key: "preferred_server1",
title: "Preferred server",
summary: "",
valueIndex: 0,
entries: ["HD-1", "HD-2", "StreamTape"],
entryValues: ["HD-1", "HD-2", "StreamTape"]),
if (source.name != "HiAnime")
ListPreference(
key: "preferred_server1",
title: "Preferred server",
summary: "",
valueIndex: 0,
entries: ["Vidstreaming", "VidCloud", "StreamTape"],
entryValues: ["Vidstreaming", "VidCloud", "StreamTape"]),
ListPreference( ListPreference(
key: "preferred_server", key: "preferred_type1",
title: "Preferred server",
summary: "",
valueIndex: 0,
entries: ["Vidstreaming", "VidCloud", "StreamTape"],
entryValues: ["Vidstreaming", "VidCloud", "StreamTape"]),
ListPreference(
key: "preferred_type",
title: "Preferred Type", title: "Preferred Type",
summary: "", summary: "",
valueIndex: 0, valueIndex: 0,
entries: ["Sub", "Dub"], entries: ["Sub", "Dub"],
entryValues: ["sub", "dub"]), entryValues: ["sub", "dub"]),
MultiSelectListPreference( if (source.name != "HiAnime")
key: "hoster_selection", MultiSelectListPreference(
title: "Enable/Disable Hosts", key: "hoster_selection1",
summary: "", title: "Enable/Disable Hosts",
entries: ["Vidstreaming", "VidCloud", "StreamTape"], summary: "",
entryValues: ["Vidstreaming", "Vidcloud", "StreamTape"], entries: ["Vidstreaming", "VidCloud", "StreamTape"],
values: ["Vidstreaming", "Vidcloud", "StreamTape"]), entryValues: ["Vidstreaming", "VidCloud", "StreamTape"],
values: ["Vidstreaming", "VidCloud", "StreamTape"]),
if (source.name == "HiAnime")
MultiSelectListPreference(
key: "hoster_selection1",
title: "Enable/Disable Hosts",
summary: "",
entries: ["HD-1", "HD-2", "StreamTape"],
entryValues: ["HD-1", "HD-2", "StreamTape"],
values: ["HD-1", "HD-2", "StreamTape"]),
MultiSelectListPreference( MultiSelectListPreference(
key: "type_selection", key: "type_selection",
title: "Enable/Disable Types", title: "Enable/Disable Types",
@@ -561,8 +582,8 @@ class ZoroTheme extends MProvider {
List<MVideo> sortVideos(List<MVideo> videos, int sourceId) { List<MVideo> sortVideos(List<MVideo> videos, int sourceId) {
String quality = getPreferenceValue(sourceId, "preferred_quality"); String quality = getPreferenceValue(sourceId, "preferred_quality");
String server = getPreferenceValue(sourceId, "preferred_server"); String server = getPreferenceValue(sourceId, "preferred_server1");
String type = getPreferenceValue(sourceId, "preferred_type"); String type = getPreferenceValue(sourceId, "preferred_type1");
videos.sort((MVideo a, MVideo b) { videos.sort((MVideo a, MVideo b) {
int qualityMatchA = 0; int qualityMatchA = 0;
@@ -592,7 +613,7 @@ class ZoroTheme extends MProvider {
} }
List<String> preferenceHosterSelection(int sourceId) { List<String> preferenceHosterSelection(int sourceId) {
return getPreferenceValue(sourceId, "hoster_selection"); return getPreferenceValue(sourceId, "hoster_selection1");
} }
List<String> preferenceTypeSelection(int sourceId) { List<String> preferenceTypeSelection(int sourceId) {