Kuronime: fix video source

This commit is contained in:
helo 2023-09-12 11:58:10 +07:00
parent 2dd73dd012
commit 2c3bab56c5
2 changed files with 8 additions and 13 deletions

View File

@ -1,5 +1,5 @@
// use an integer for version numbers // use an integer for version numbers
version = 16 version = 17
cloudstream { cloudstream {

View File

@ -8,7 +8,7 @@ import com.lagradost.cloudstream3.LoadResponse.Companion.addTrailer
import com.lagradost.cloudstream3.extractors.helper.AesHelper import com.lagradost.cloudstream3.extractors.helper.AesHelper
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
import com.lagradost.cloudstream3.utils.ExtractorLink import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.Qualities import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.getQualityFromName import com.lagradost.cloudstream3.utils.getQualityFromName
import com.lagradost.cloudstream3.utils.loadExtractor import com.lagradost.cloudstream3.utils.loadExtractor
import org.jsoup.nodes.Element import org.jsoup.nodes.Element
@ -197,17 +197,12 @@ class KuronimeProvider : MainAPI() {
) )
val source = val source =
tryParseJson<Sources>(decrypt?.toJsonFormat())?.src?.replace("\\", "") tryParseJson<Sources>(decrypt?.toJsonFormat())?.src?.replace("\\", "")
callback.invoke( M3u8Helper.generateM3u8(
ExtractorLink( this.name,
this.name, source ?: return@argamap,
this.name, "$animekuUrl/",
source ?: return@argamap, headers = mapOf("Origin" to animekuUrl)
"$animekuUrl/", ).forEach(callback)
Qualities.P1080.value,
true,
headers = mapOf("Origin" to animekuUrl)
)
)
}, },
{ {
val decrypt = AesHelper.cryptoAESHandler( val decrypt = AesHelper.cryptoAESHandler(