sora: bump

This commit is contained in:
hexated 2023-06-28 23:05:04 +07:00
parent 1e98fbc383
commit 2e7789e4e8
3 changed files with 1 additions and 45 deletions

View file

@ -1,7 +1,7 @@
import org.jetbrains.kotlin.konan.properties.Properties
// use an integer for version numbers
version = 140
version = 141
android {
defaultConfig {

View file

@ -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)
}

View file

@ -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,