From 2c5f8fd70342dd9980a7327b574c81613fee9797 Mon Sep 17 00:00:00 2001 From: Claudemirovsky <63046606+Claudemirovsky@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:11:01 -0300 Subject: [PATCH 1/5] fix: Update baseUrl --- .../animeextension/de/streamcloud/StreamCloud.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt b/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt index d2aa199e3c..6cbaa84a88 100644 --- a/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt +++ b/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.animeextension.de.streamcloud import android.app.Application -import android.content.SharedPreferences import androidx.preference.ListPreference import androidx.preference.MultiSelectListPreference import androidx.preference.PreferenceScreen @@ -15,7 +14,6 @@ import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.util.asJsoup import okhttp3.Headers -import okhttp3.OkHttpClient import okhttp3.Request import okhttp3.Response import org.jsoup.nodes.Document @@ -28,15 +26,15 @@ class StreamCloud : ConfigurableAnimeSource, ParsedAnimeHttpSource() { override val name = "StreamCloud" - override val baseUrl = "https://streamcloud.cam" + override val baseUrl = "https://streamcloud.movie" override val lang = "de" override val supportsLatest = false - override val client: OkHttpClient = network.cloudflareClient + override val client = network.cloudflareClient - private val preferences: SharedPreferences by lazy { + private val preferences by lazy { Injekt.get().getSharedPreferences("source_$id", 0x0000) } From 413dcf1d3cd3aadbc90d557e178b88a0bf67a9c4 Mon Sep 17 00:00:00 2001 From: Claudemirovsky <63046606+Claudemirovsky@users.noreply.github.com> Date: Thu, 2 Nov 2023 15:27:15 -0300 Subject: [PATCH 2/5] fix: Fix video extractor --- src/de/streamcloud/build.gradle | 1 + .../de/streamcloud/StreamCloud.kt | 63 +++++++------------ 2 files changed, 25 insertions(+), 39 deletions(-) diff --git a/src/de/streamcloud/build.gradle b/src/de/streamcloud/build.gradle index e4bce67e22..0b0e73222c 100644 --- a/src/de/streamcloud/build.gradle +++ b/src/de/streamcloud/build.gradle @@ -12,6 +12,7 @@ ext { dependencies { implementation(project(':lib-dood-extractor')) + implementation(project(':lib-streamtape-extractor')) } apply from: "$rootDir/common.gradle" diff --git a/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt b/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt index 6cbaa84a88..78b836ed18 100644 --- a/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt +++ b/src/de/streamcloud/src/eu/kanade/tachiyomi/animeextension/de/streamcloud/StreamCloud.kt @@ -11,6 +11,7 @@ import eu.kanade.tachiyomi.animesource.model.SEpisode import eu.kanade.tachiyomi.animesource.model.Video import eu.kanade.tachiyomi.animesource.online.ParsedAnimeHttpSource import eu.kanade.tachiyomi.lib.doodextractor.DoodExtractor +import eu.kanade.tachiyomi.lib.streamtapeextractor.StreamTapeExtractor import eu.kanade.tachiyomi.network.GET import eu.kanade.tachiyomi.util.asJsoup import okhttp3.Headers @@ -75,57 +76,41 @@ class StreamCloud : ConfigurableAnimeSource, ParsedAnimeHttpSource() { // Video Extractor - override fun videoListRequest(episode: SEpisode): Request { - return GET(baseUrl + episode.url, headers = Headers.headersOf("if-modified-since", "")) - } + private val streamtapeExtractor by lazy { StreamTapeExtractor(client) } + private val doodExtractor by lazy { DoodExtractor(client) } override fun videoListParse(response: Response): List