From eff0f36919bfe944f05a33bc61708fd973eda2ed Mon Sep 17 00:00:00 2001 From: hexated Date: Wed, 5 Jul 2023 10:04:20 +0700 Subject: [PATCH] mini: update --- Minioppai/build.gradle.kts | 2 +- Minioppai/src/main/kotlin/com/hexated/Minioppai.kt | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) 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) ) ) }