From 2e7789e4e84918a4616ac37d9855ac7ca9fe8453 Mon Sep 17 00:00:00 2001 From: hexated Date: Wed, 28 Jun 2023 23:05:04 +0700 Subject: [PATCH] sora: bump --- SoraStream/build.gradle.kts | 2 +- .../main/kotlin/com/hexated/SoraExtractor.kt | 3 -- .../src/main/kotlin/com/hexated/SoraUtils.kt | 41 ------------------- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/SoraStream/build.gradle.kts b/SoraStream/build.gradle.kts index 1d00ea54..77759bb8 100644 --- a/SoraStream/build.gradle.kts +++ b/SoraStream/build.gradle.kts @@ -1,7 +1,7 @@ import org.jetbrains.kotlin.konan.properties.Properties // use an integer for version numbers -version = 140 +version = 141 android { defaultConfig { diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index f4a4a045..d08175ad 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -1972,9 +1972,6 @@ object SoraExtractor : SoraStream() { it.first.contains("/dude_tv") -> { invokeSmashyDude(it.second, it.first, callback) } - it.first.contains("/nflim") -> { - invokeSmashyNflim(it.second, it.first, subtitleCallback, callback) - } it.first.contains("/rip") -> { invokeSmashyRip(it.second, it.first, subtitleCallback, callback) } diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt index fec7557b..d3ce46d8 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraUtils.kt @@ -518,47 +518,6 @@ suspend fun invokeSmashyDude( } -suspend fun invokeSmashyNflim( - name: String, - url: String, - subtitleCallback: (SubtitleFile) -> Unit, - callback: (ExtractorLink) -> Unit, -) { - val script = - app.get(url).document.selectFirst("script:containsData(player =)")?.data() ?: return - - val sources = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return - val subtitles = Regex("['\"]?subtitle['\"]?:\\s*\"([^\"]+)").find(script)?.groupValues?.get(1) ?: return - - sources.split(",").map { links -> - val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim() - val trimmedLink = links.removePrefix("[$quality]").trim() - callback.invoke( - ExtractorLink( - "Smashy [$name]", - "Smashy [$name]", - trimmedLink, - "", - quality?.toIntOrNull() ?: return@map, - isM3u8 = true, - ) - ) - } - - subtitles.split(",").map { sub -> - val lang = Regex("\\[(.*?)]").find(sub)?.groupValues?.getOrNull(1)?.trim() ?: return@map - val trimmedSubLink = sub.removePrefix("[$lang]").trim().substringAfter("?url=") - if(lang.contains("\\u")) return@map - subtitleCallback.invoke( - SubtitleFile( - lang, - trimmedSubLink - ) - ) - } - -} - suspend fun invokeSmashyRip( name: String, url: String,