diff --git a/Minioppai/build.gradle.kts b/Minioppai/build.gradle.kts index b6d79f30..3d8a6e96 100644 --- a/Minioppai/build.gradle.kts +++ b/Minioppai/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 2 +version = 3 cloudstream { diff --git a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt index 129a20b9..ece21181 100644 --- a/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt +++ b/Minioppai/src/main/kotlin/com/hexated/Minioppai.kt @@ -165,14 +165,20 @@ class Minioppai : MainAPI() { val sources = script.substringAfter("sources:[").substringBefore("]").replace("'", "\"") val subtitles = script.substringAfter("\"tracks\":[").substringBefore("]") - tryParseJson>("[$sources]")?.map { + tryParseJson>("[$sources]")?.map { source -> + val pStream = fixLink(source.file ?: return@map, paistream).takeIf { + app.get( + it, + referer = "$paistream/" + ).isSuccessful + } callback.invoke( ExtractorLink( server, server, - fixLink(it.file ?: return@map, if(server == "Stream 1") libPaistream else paistream), + pStream ?: fixLink(source.file ?: return@map, libPaistream), "$paistream/", - getQualityFromName(it.label) + getQualityFromName(source.label) ) ) }