diff --git a/lib/playlist-utils/src/main/java/eu/kanade/tachiyomi/lib/playlistutils/PlaylistUtils.kt b/lib/playlist-utils/src/main/java/eu/kanade/tachiyomi/lib/playlistutils/PlaylistUtils.kt index bbe306b62a..846e36236c 100644 --- a/lib/playlist-utils/src/main/java/eu/kanade/tachiyomi/lib/playlistutils/PlaylistUtils.kt +++ b/lib/playlist-utils/src/main/java/eu/kanade/tachiyomi/lib/playlistutils/PlaylistUtils.kt @@ -30,7 +30,7 @@ class PlaylistUtils(private val client: OkHttpClient, private val headers: Heade fun extractFromHls( playlistUrl: String, referer: String = "", - mB: Boolean = true, + baseOnOff: Boolean = true, masterHeaders: Headers, videoHeaders: Headers, videoNameGen: (String) -> String = { quality -> quality }, @@ -40,7 +40,7 @@ class PlaylistUtils(private val client: OkHttpClient, private val headers: Heade return extractFromHls( playlistUrl, referer, - mB, + baseOnOff, { _, _ -> masterHeaders }, { _, _, _ -> videoHeaders }, videoNameGen, @@ -73,7 +73,7 @@ class PlaylistUtils(private val client: OkHttpClient, private val headers: Heade fun extractFromHls( playlistUrl: String, referer: String = "", - mB: Boolean = true, + baseOnOff: Boolean = true, masterHeadersGen: (Headers, String) -> Headers = { baseHeaders, referer -> generateMasterHeaders(baseHeaders, referer) }, @@ -100,7 +100,7 @@ class PlaylistUtils(private val client: OkHttpClient, private val headers: Heade val playlistHttpUrl = playlistUrl.toHttpUrl() - val masterBase = if(mB) { + val masterBase = if(baseOnOff) { playlistHttpUrl.newBuilder().apply { removePathSegment(playlistHttpUrl.pathSize - 1) }.build().toString() + "/" diff --git a/lib/streamwish-extractor/src/main/java/eu/kanade/tachiyomi/lib/streamwishextractor/StreamWishExtractor.kt b/lib/streamwish-extractor/src/main/java/eu/kanade/tachiyomi/lib/streamwishextractor/StreamWishExtractor.kt index e81fe18fea..32e17f6690 100644 --- a/lib/streamwish-extractor/src/main/java/eu/kanade/tachiyomi/lib/streamwishextractor/StreamWishExtractor.kt +++ b/lib/streamwish-extractor/src/main/java/eu/kanade/tachiyomi/lib/streamwishextractor/StreamWishExtractor.kt @@ -8,7 +8,7 @@ import eu.kanade.tachiyomi.util.asJsoup import okhttp3.Headers import okhttp3.OkHttpClient -class StreamWishExtractor(private val client: OkHttpClient, private val headers: Headers, private val mB: Boolean = true) { +class StreamWishExtractor(private val client: OkHttpClient, private val headers: Headers, private val baseOnOff: Boolean = true) { private val playlistUtils by lazy { PlaylistUtils(client, headers) } fun videosFromUrl(url: String, prefix: String) = videosFromUrl(url) { "$prefix - $it" } @@ -31,6 +31,6 @@ class StreamWishExtractor(private val client: OkHttpClient, private val headers: ?.takeIf(String::isNotBlank) ?: return emptyList() - return playlistUtils.extractFromHls(masterUrl, url, videoNameGen = videoNameGen, mB = mB) + return playlistUtils.extractFromHls(masterUrl, url, videoNameGen = videoNameGen, baseOnOff = baseOnOff) } } diff --git a/src/de/moflixstream/src/eu/kanade/tachiyomi/animeextension/de/moflixstream/MoflixStream.kt b/src/de/moflixstream/src/eu/kanade/tachiyomi/animeextension/de/moflixstream/MoflixStream.kt index cd7c908f7e..5bf15ab887 100644 --- a/src/de/moflixstream/src/eu/kanade/tachiyomi/animeextension/de/moflixstream/MoflixStream.kt +++ b/src/de/moflixstream/src/eu/kanade/tachiyomi/animeextension/de/moflixstream/MoflixStream.kt @@ -203,7 +203,7 @@ class MoflixStream : ConfigurableAnimeSource, AnimeHttpSource() { videoList.addAll(videos) } host.contains("Filelions") && hosterSelection?.contains("flions") == true -> { - val videos = StreamWishExtractor(client, headers, mB = false).videosFromUrl(eUrl, videoNameGen = { quality -> "FileLions - $quality" }) + val videos = StreamWishExtractor(client, headers, baseOnOff = false).videosFromUrl(eUrl, videoNameGen = { quality -> "FileLions - $quality" }) videoList.addAll(videos) } host.contains("LuluStream") && hosterSelection?.contains("lstream") == true -> { @@ -235,7 +235,7 @@ class MoflixStream : ConfigurableAnimeSource, AnimeHttpSource() { videoList.addAll(videos) } host.contains("Filelions") && hosterSelection?.contains("flions") == true -> { - val videos = StreamWishExtractor(client, headers, mB = false).videosFromUrl(fUrl, videoNameGen = { quality -> "FileLions - $quality" }) + val videos = StreamWishExtractor(client, headers, baseOnOff = false).videosFromUrl(fUrl, videoNameGen = { quality -> "FileLions - $quality" }) videoList.addAll(videos) } host.contains("VidGuard") && hosterSelection?.contains("vidg") == true -> {