From 1b9b9fae184af8da11a54d7db485c88c6d8f7c30 Mon Sep 17 00:00:00 2001 From: hexated Date: Fri, 14 Apr 2023 21:47:38 +0700 Subject: [PATCH] temp fix --- Loklok/build.gradle.kts | 2 +- Loklok/src/main/kotlin/com/hexated/Loklok.kt | 8 +++----- SoraStream/build.gradle.kts | 2 +- SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt | 4 ++-- SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt | 1 + 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Loklok/build.gradle.kts b/Loklok/build.gradle.kts index b102c031..c974489c 100644 --- a/Loklok/build.gradle.kts +++ b/Loklok/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 23 +version = 24 cloudstream { diff --git a/Loklok/src/main/kotlin/com/hexated/Loklok.kt b/Loklok/src/main/kotlin/com/hexated/Loklok.kt index e1dd56ab..a64f7e9c 100644 --- a/Loklok/src/main/kotlin/com/hexated/Loklok.kt +++ b/Loklok/src/main/kotlin/com/hexated/Loklok.kt @@ -24,13 +24,11 @@ class Loklok : MainAPI() { TvType.Anime, TvType.AsianDrama, ) - - // no license found - // thanks to https://github.com/napthedev/filmhot for providing API companion object { private const val geoblockError = "Loklok is Geoblock, use vpn or give up" private val api = base64DecodeAPI("dg==LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=") private val apiUrl = "$api/${base64Decode("Y21zL2FwcA==")}" + private val pcApiUrl = base64DecodeAPI("cGM=Yi8=d2U=cy8=Y20=di8=LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=") private val searchApi = base64Decode("aHR0cHM6Ly9sb2tsb2suY29t") private const val mainImageUrl = "https://images.weserv.nl" private val headers = mutableMapOf( @@ -233,7 +231,7 @@ class Loklok : MainAPI() { RequestBodyTypes.JSON.toMediaTypeOrNull() ) val json = app.get( - "$apiUrl/media/previewInfo?category=${res.category}&contentId=${res.id}&episodeId=${res.epId}&definition=${video.code}", + "$pcApiUrl/movieDrama/getPlayInfo?category=${res.category}&contentId=${res.id}&episodeId=${res.epId}&definition=${video.code}", headers = headers, ).parsedSafe()?.data callback.invoke( @@ -241,7 +239,7 @@ class Loklok : MainAPI() { this.name, this.name, json?.mediaUrl ?: return@apmap null, - "", + "https://loklok.com/", getQuality(json.currentDefinition ?: ""), isM3u8 = true, ) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index c4e90890..9f3be0b6 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 116 +version = 117 cloudstream { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index dfa6ff86..9f97af5c 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -678,7 +678,7 @@ object SoraExtractor : SoraStream() { json.definitionList?.map { video -> val media = app.get( - "${soraAPI}/media/previewInfo?category=${type}&contentId=${id}&episodeId=${json.id}&definition=${video.code}", + "$soraSecondAPI/movieDrama/getPlayInfo?category=${type}&contentId=${id}&episodeId=${json.id}&definition=${video.code}", headers = soraHeaders, ).parsedSafe()?.data @@ -687,7 +687,7 @@ object SoraExtractor : SoraStream() { this.name, this.name, media?.mediaUrl ?: return@map null, - "", + "https://loklok.com/", getSoraQuality(media.currentDefinition ?: ""), true, ) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index d2f4c794..b2ec3375 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -41,6 +41,7 @@ import kotlin.collections.ArrayList import kotlin.math.min val soraAPI = base64DecodeAPI("cA==YXA=cy8=Y20=di8=LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=") +val soraSecondAPI = base64DecodeAPI("cGM=Yi8=d2U=cy8=Y20=di8=LnQ=b2s=a2w=bG8=aS4=YXA=ZS0=aWw=b2I=LW0=Z2E=Ly8=czo=dHA=aHQ=") val soraBackupAPI = base64DecodeAPI("dg==LnQ=bGw=aGk=dGM=dXM=Lmo=b2s=a2w=bG8=Ly8=czo=dHA=aHQ=") val soraHeaders = mapOf(