This commit is contained in:
kodjomoustapha
2024-09-18 13:11:16 +01:00
parent b08cf72777
commit 839cebb2e5
3 changed files with 35 additions and 14 deletions

View File

@@ -76,8 +76,9 @@ class AnimeToast extends MProvider {
} else { } else {
elements = document.select("#multi_link_tab1"); elements = document.select("#multi_link_tab1");
} }
for (var element in elements) { for (var element in elements) {
final episodeElement = element.selectFirst("div.tab-pane a"); final episodeElement = element.selectFirst("a");
final epT = episodeElement.text; final epT = episodeElement.text;
if (epT.contains(":") || epT.contains("-")) { if (epT.contains(":") || epT.contains("-")) {
final url = episodeElement.attr("href"); final url = episodeElement.attr("href");
@@ -92,7 +93,7 @@ class AnimeToast extends MProvider {
episodesList.add(ep); episodesList.add(ep);
} }
} else { } else {
final episodeElements = element.select("div.tab-pane a"); final episodeElements = element.select("a");
for (var epElement in episodeElements) { for (var epElement in episodeElements) {
MChapter ep = MChapter(); MChapter ep = MChapter();
ep.name = epElement.text; ep.name = epElement.text;

View File

@@ -1,7 +1,7 @@
import '../../../../../model/source.dart'; import '../../../../../model/source.dart';
Source get animetoast => _animetoast; Source get animetoast => _animetoast;
const _animetoastVersion = "0.0.15"; const _animetoastVersion = "0.0.2";
const _animetoastCodeUrl = const _animetoastCodeUrl =
"https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/de/animetoast/animetoast.dart"; "https://raw.githubusercontent.com/kodjodevf/mangayomi-extensions/$branchName/dart/anime/src/de/animetoast/animetoast.dart";
Source _animetoast = Source( Source _animetoast = Source(

View File

@@ -7,7 +7,7 @@ const mangayomiSources = [{
"typeSource": "single", "typeSource": "single",
"isManga": false, "isManga": false,
"isNsfw": false, "isNsfw": false,
"version": "0.0.2", "version": "0.0.25",
"dateFormat": "", "dateFormat": "",
"dateFormatLocale": "", "dateFormatLocale": "",
"pkgPath": "anime/src/en/allanime.js" "pkgPath": "anime/src/en/allanime.js"
@@ -172,7 +172,7 @@ class DefaultExtension extends MProvider {
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
} }
} else if (["vidstreaming", "https://gogo", "playgo1.cc", "playtaku"].some(element => videoUrl.includes(element)) && altHosterSelection.some(element => 'vidstreaming' === element)) { } else if (["vidstreaming", "https://gogo", "playgo1.cc", "playtaku", "vidcloud"].some(element => videoUrl.includes(element)) && altHosterSelection.some(element => 'vidstreaming' === element)) {
const vids = await gogoCdnExtractor(videoUrl); const vids = await gogoCdnExtractor(videoUrl);
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
@@ -182,7 +182,7 @@ class DefaultExtension extends MProvider {
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
} }
} else if (videoUrl.includes("ok.ru") && altHosterSelection.some(element => 'okru' === element)) { } else if (["ok.ru", "okru"].some(element => videoUrl.includes(element)) && altHosterSelection.some(element => 'okru' === element)) {
const vids = await okruExtractor(videoUrl); const vids = await okruExtractor(videoUrl);
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
@@ -197,6 +197,16 @@ class DefaultExtension extends MProvider {
for (const vid of vids) { for (const vid of vids) {
videos.push(vid); videos.push(vid);
} }
} else if (["filemoon", "moonplayer"].some(element => videoUrl.includes(element)) && altHosterSelection.some(element => 'filemoon' === element)) {
const vids = await filemoonExtractor(videoUrl);
for (const vid of vids) {
videos.push(vid);
}
} else if (videoUrl.includes("wish") && altHosterSelection.some(element => 'streamwish' === element)) {
const vids = await streamwishExtractor(videoUrl);
for (const vid of vids) {
videos.push(vid);
}
} }
} }
return this.sortVideos(videos); return this.sortVideos(videos);
@@ -280,7 +290,7 @@ class DefaultExtension extends MProvider {
} }
}, },
{ {
"key": "preferred_hoster", "key": "preferred_hoster_",
"listPreference": { "listPreference": {
"title": "Preferred Video Server", "title": "Preferred Video Server",
"summary": "", "summary": "",
@@ -288,17 +298,21 @@ class DefaultExtension extends MProvider {
"entries": [ "entries": [
"Ac", "Ak", "Kir", "Rab", "Luf-mp4", "Ac", "Ak", "Kir", "Rab", "Luf-mp4",
"Si-Hls", "S-mp4", "Ac-Hls", "Uv-mp4", "Pn-Hls", "Si-Hls", "S-mp4", "Ac-Hls", "Uv-mp4", "Pn-Hls",
"vidstreaming", "okru", "mp4upload", "streamlare", "doodstream" "vidstreaming", "okru", "mp4upload", "streamlare", "doodstream",
"filemoon",
"streamwish"
], ],
"entryValues": [ "entryValues_": [
"Ac", "Ak", "Kir", "Rab", "Luf-mp4", "Ac", "Ak", "Kir", "Rab", "Luf-mp4",
"Si-Hls", "S-mp4", "Ac-Hls", "Uv-mp4", "Pn-Hls", "Si-Hls", "S-mp4", "Ac-Hls", "Uv-mp4", "Pn-Hls",
"vidstreaming", "okru", "mp4upload", "streamlare", "doodstream" "vidstreaming", "okru", "mp4upload", "streamlare", "doodstream",
"filemoon",
"streamwish"
] ]
} }
}, },
{ {
"key": "alt_hoster_selection", "key": "alt_hoster_selection_",
"multiSelectListPreference": { "multiSelectListPreference": {
"title": "Enable/Disable Alternative Hosts", "title": "Enable/Disable Alternative Hosts",
"summary": "", "summary": "",
@@ -308,7 +322,9 @@ class DefaultExtension extends MProvider {
"okru", "okru",
"mp4upload", "mp4upload",
"streamlare", "streamlare",
"doodstream" "doodstream",
"filemoon",
"streamwish"
], ],
"entryValues": [ "entryValues": [
"player", "player",
@@ -316,7 +332,9 @@ class DefaultExtension extends MProvider {
"okru", "okru",
"mp4upload", "mp4upload",
"streamlare", "streamlare",
"doodstream" "doodstream",
"filemoon",
"streamwish"
], ],
"values": [ "values": [
"player", "player",
@@ -324,7 +342,9 @@ class DefaultExtension extends MProvider {
"okru", "okru",
"mp4upload", "mp4upload",
"streamlare", "streamlare",
"doodstream" "doodstream",
"filemoon",
"streamwish"
] ]
} }
} }