From cdb34effb3ceab0081bbb71cbed8018033607df2 Mon Sep 17 00:00:00 2001 From: Blatzar <46196380+Blatzar@users.noreply.github.com> Date: Fri, 18 Nov 2022 00:16:20 +0100 Subject: [PATCH] Fix SuperStream timeout and Zoro --- SflixProvider/build.gradle.kts | 2 +- .../main/kotlin/com/lagradost/ZoroProvider.kt | 29 ++++++++++--------- SuperStream/build.gradle.kts | 2 +- .../main/kotlin/com/lagradost/SuperStream.kt | 3 +- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/SflixProvider/build.gradle.kts b/SflixProvider/build.gradle.kts index 9e9f6d0..942db7d 100644 --- a/SflixProvider/build.gradle.kts +++ b/SflixProvider/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 9 +version = 10 cloudstream { diff --git a/SflixProvider/src/main/kotlin/com/lagradost/ZoroProvider.kt b/SflixProvider/src/main/kotlin/com/lagradost/ZoroProvider.kt index 83d35e1..963acf5 100644 --- a/SflixProvider/src/main/kotlin/com/lagradost/ZoroProvider.kt +++ b/SflixProvider/src/main/kotlin/com/lagradost/ZoroProvider.kt @@ -1,6 +1,7 @@ package com.lagradost import com.fasterxml.jackson.annotation.JsonProperty +import com.lagradost.SflixProvider.Companion.extractRabbitStream import com.lagradost.cloudstream3.* import com.lagradost.cloudstream3.LoadResponse.Companion.addAniListId import com.lagradost.cloudstream3.LoadResponse.Companion.addMalId @@ -345,21 +346,21 @@ class ZoroProvider : MainAPI() { val extractorLink = app.get( link, ).parsed().link -// val hasLoadedExtractorLink = + val hasLoadedExtractorLink = loadExtractor(extractorLink, "https://rapid-cloud.ru/", subtitleCallback, callback) -// if (!hasLoadedExtractorLink) { -// extractRabbitStream( -// extractorLink, -// subtitleCallback, -// // Blacklist VidCloud for now -// { videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) }, -//// false, -//// extractorData, -//// decryptKey = getKey() -// ) { sourceName -> -// sourceName + " - ${it.first}" -// } -// } + if (!hasLoadedExtractorLink) { + extractRabbitStream( + extractorLink, + subtitleCallback, + // Blacklist VidCloud for now + { videoLink -> if (!videoLink.url.contains("betterstream")) callback(videoLink) }, + false, + null, + decryptKey = getKey() + ) { sourceName -> + sourceName + " - ${it.first}" + } + } } return true diff --git a/SuperStream/build.gradle.kts b/SuperStream/build.gradle.kts index d388487..0e09b16 100644 --- a/SuperStream/build.gradle.kts +++ b/SuperStream/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 4 +version = 5 cloudstream { diff --git a/SuperStream/src/main/kotlin/com/lagradost/SuperStream.kt b/SuperStream/src/main/kotlin/com/lagradost/SuperStream.kt index 3885358..f18bb26 100644 --- a/SuperStream/src/main/kotlin/com/lagradost/SuperStream.kt +++ b/SuperStream/src/main/kotlin/com/lagradost/SuperStream.kt @@ -22,6 +22,7 @@ import javax.crypto.spec.SecretKeySpec import kotlin.math.roundToInt class SuperStream : MainAPI() { + private val timeout = 120L override var name = "SuperStream" override val hasMainPage = true override val hasChromecastSupport = true @@ -177,7 +178,7 @@ class SuperStream : MainAPI() { "medium" to "Website&token$token" ) - return app.post(apiUrl, headers = headers, data = data) + return app.post(apiUrl, headers = headers, data = data, timeout = timeout) } private suspend inline fun queryApiParsed(query: String): T {