From 0f84f8a4da5c69a51e0b8177c46ebd57415de4df Mon Sep 17 00:00:00 2001 From: folke Date: Sat, 14 Oct 2023 11:20:18 +0200 Subject: [PATCH 1/3] fix(en): fix vidsrc extractor --- src/en/fmovies/build.gradle | 2 +- .../animeextension/en/fmovies/FMovies.kt | 3 ++ .../en/fmovies/FMoviesHelper.kt | 2 +- .../en/fmovies/extractors/VidsrcExtractor.kt | 47 +++++++++++++++---- src/en/seez/build.gradle | 2 +- .../animeextension/en/seez/VrfHelper.kt | 2 +- .../en/seez/extractors/VidsrcExtractor.kt | 44 +++++++++++++---- 7 files changed, 80 insertions(+), 22 deletions(-) diff --git a/src/en/fmovies/build.gradle b/src/en/fmovies/build.gradle index 2f01ebd7c4..3d82c1fa51 100644 --- a/src/en/fmovies/build.gradle +++ b/src/en/fmovies/build.gradle @@ -8,7 +8,7 @@ ext { extName = 'FMovies' pkgNameSuffix = 'en.fmovies' extClass = '.FMovies' - extVersionCode = 10 + extVersionCode = 11 libVersion = '13' } diff --git a/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMovies.kt b/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMovies.kt index dee9d13c8e..f6693875fa 100644 --- a/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMovies.kt +++ b/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMovies.kt @@ -2,6 +2,7 @@ package eu.kanade.tachiyomi.animeextension.en.fmovies import android.app.Application import android.content.SharedPreferences +import android.util.Log import androidx.preference.ListPreference import androidx.preference.MultiSelectListPreference import androidx.preference.PreferenceScreen @@ -237,6 +238,8 @@ class FMovies : ConfigurableAnimeSource, ParsedAnimeHttpSource() { val decrypted = vrfHelper.decrypt(encrypted) + Log.i("SOMETHING", "$name - $decrypted") + when (name) { "Vidplay", "MyCloud" -> vidsrcExtractor.videosFromUrl(decrypted, name) "Filemoon" -> filemoonExtractor.videosFromUrl(decrypted, headers = headers) diff --git a/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMoviesHelper.kt b/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMoviesHelper.kt index 293fb0ec4a..f0e0b045ac 100644 --- a/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMoviesHelper.kt +++ b/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/FMoviesHelper.kt @@ -39,7 +39,7 @@ class FMoviesHelper(private val client: OkHttpClient, private val headers: Heade fun getVidSrc(query: String, host: String): String { val url = API_URL.newBuilder().apply { - addPathSegment(if (host == "vidstream.pro") "rawVizcloud" else "rawMcloud") + addPathSegment(if (host.contains("mcloud", true)) "rawMcloud" else "rawVizcloud") addQueryParameter("apikey", API_KEY) }.build().toString() diff --git a/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/extractors/VidsrcExtractor.kt b/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/extractors/VidsrcExtractor.kt index 79d3e3a71a..6a86a5d115 100644 --- a/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/extractors/VidsrcExtractor.kt +++ b/src/en/fmovies/src/eu/kanade/tachiyomi/animeextension/en/fmovies/extractors/VidsrcExtractor.kt @@ -1,5 +1,6 @@ package eu.kanade.tachiyomi.animeextension.en.fmovies.extractors +import android.util.Log import eu.kanade.tachiyomi.animeextension.en.fmovies.FMoviesHelper import eu.kanade.tachiyomi.animeextension.en.fmovies.FMoviesSubs import eu.kanade.tachiyomi.animeextension.en.fmovies.VidsrcResponse @@ -21,19 +22,27 @@ class VidsrcExtractor(private val client: OkHttpClient, private val headers: Hea private val playlistUtils by lazy { PlaylistUtils(client, headers) } fun videosFromUrl(url: String, name: String): List