diff --git a/anime/multisrc/zorotheme/sources.dart b/anime/multisrc/zorotheme/sources.dart index 30c1552c..b8dde3eb 100644 --- a/anime/multisrc/zorotheme/sources.dart +++ b/anime/multisrc/zorotheme/sources.dart @@ -1,8 +1,8 @@ import '../../../model/source.dart'; -import 'src/aniwatch/aniwatch.dart'; +import 'src/hianime/hianime.dart'; import 'src/kaido/kaido.dart'; -const _zorothemeVersion = "0.0.8"; +const _zorothemeVersion = "0.0.85"; const _zorothemeSourceCodeUrl = "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/anime/multisrc/zorotheme/zorotheme.dart"; diff --git a/anime/multisrc/zorotheme/src/aniwatch/icon.png b/anime/multisrc/zorotheme/src/aniwatch/icon.png deleted file mode 100644 index bcad3990..00000000 Binary files a/anime/multisrc/zorotheme/src/aniwatch/icon.png and /dev/null differ diff --git a/anime/multisrc/zorotheme/src/aniwatch/aniwatch.dart b/anime/multisrc/zorotheme/src/hianime/hianime.dart similarity index 65% rename from anime/multisrc/zorotheme/src/aniwatch/aniwatch.dart rename to anime/multisrc/zorotheme/src/hianime/hianime.dart index 498e4eed..62d9dc79 100644 --- a/anime/multisrc/zorotheme/src/aniwatch/aniwatch.dart +++ b/anime/multisrc/zorotheme/src/hianime/hianime.dart @@ -3,11 +3,12 @@ import '../../../../../model/source.dart'; Source get aniwatchSource => _aniwatchSource; Source _aniwatchSource = Source( - name: "AniWatch.to", - baseUrl: "https://aniwatch.to", + id: 814067600, + name: "HiAnime", + baseUrl: "https://hianime.to", isManga: false, lang: "en", typeSource: "zorotheme", 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", ); diff --git a/anime/multisrc/zorotheme/src/hianime/icon.png b/anime/multisrc/zorotheme/src/hianime/icon.png new file mode 100644 index 00000000..02dc16cf Binary files /dev/null and b/anime/multisrc/zorotheme/src/hianime/icon.png differ diff --git a/anime/multisrc/zorotheme/zorotheme.dart b/anime/multisrc/zorotheme/zorotheme.dart index e997daae..adbbb936 100644 --- a/anime/multisrc/zorotheme/zorotheme.dart +++ b/anime/multisrc/zorotheme/zorotheme.dart @@ -205,7 +205,10 @@ class ZoroTheme extends MProvider { a = await rapidCloudExtractor(epUrl, "Vidcloud - $subDub"); } else if (name.contains("StreamTape")) { 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); } } @@ -528,27 +531,45 @@ class ZoroTheme extends MProvider { valueIndex: 1, entries: ["1080p", "720p", "480p", "360p"], 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( - key: "preferred_server", - title: "Preferred server", - summary: "", - valueIndex: 0, - entries: ["Vidstreaming", "VidCloud", "StreamTape"], - entryValues: ["Vidstreaming", "VidCloud", "StreamTape"]), - ListPreference( - key: "preferred_type", + key: "preferred_type1", title: "Preferred Type", summary: "", valueIndex: 0, entries: ["Sub", "Dub"], entryValues: ["sub", "dub"]), - MultiSelectListPreference( - key: "hoster_selection", - title: "Enable/Disable Hosts", - summary: "", - entries: ["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: ["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( key: "type_selection", title: "Enable/Disable Types", @@ -561,8 +582,8 @@ class ZoroTheme extends MProvider { List sortVideos(List videos, int sourceId) { String quality = getPreferenceValue(sourceId, "preferred_quality"); - String server = getPreferenceValue(sourceId, "preferred_server"); - String type = getPreferenceValue(sourceId, "preferred_type"); + String server = getPreferenceValue(sourceId, "preferred_server1"); + String type = getPreferenceValue(sourceId, "preferred_type1"); videos.sort((MVideo a, MVideo b) { int qualityMatchA = 0; @@ -592,7 +613,7 @@ class ZoroTheme extends MProvider { } List preferenceHosterSelection(int sourceId) { - return getPreferenceValue(sourceId, "hoster_selection"); + return getPreferenceValue(sourceId, "hoster_selection1"); } List preferenceTypeSelection(int sourceId) {