This commit is contained in:
Olivia 2024-01-25 18:46:52 +07:00
parent da8defa795
commit d039139237
2 changed files with 2 additions and 14 deletions

View file

@ -1750,8 +1750,9 @@ object SoraExtractor : SoraStream() {
invokeSmashyFfix(it.second, it.first, url, subtitleCallback, callback)
}
"Player SU" -> {
invokeSmashySu(it.second, it.first, url, subtitleCallback, callback)
invokeSmashySu(it.second, it.first, url, callback)
}
else -> return@apmap
}
}

View file

@ -425,7 +425,6 @@ suspend fun invokeSmashySu(
name: String,
url: String,
ref: String,
subtitleCallback: (SubtitleFile) -> Unit,
callback: (ExtractorLink) -> Unit,
) {
val json = app.get(url, referer = ref, headers = mapOf("X-Requested-With" to "XMLHttpRequest"))
@ -444,18 +443,6 @@ suspend fun invokeSmashySu(
)
)
}
json?.subtitleUrls?.removeSuffix(",")?.split(",")?.forEach { sub ->
val lang = "\\[(.*)]".toRegex().find(sub)?.groupValues?.get(1)
val subUrl = sub.replace("[$lang]", "").trim()
subtitleCallback.invoke(
SubtitleFile(
lang ?: return@forEach,
subUrl
)
)
}
}
suspend fun getDumpIdAndType(title: String?, year: Int?, season: Int?): Pair<String?, Int?> {