mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
Update SoraExtractor.kt smashy update (#437)
This commit is contained in:
parent
8f287186e5
commit
7dfce0f19e
1 changed files with 11 additions and 6 deletions
|
@ -1619,27 +1619,32 @@ object SoraExtractor : SoraStream() {
|
|||
}
|
||||
|
||||
suspend fun invokeSmashyStream(
|
||||
tmdbId: Int? = null,
|
||||
imdbId: String? = null,
|
||||
season: Int? = null,
|
||||
episode: Int? = null,
|
||||
subtitleCallback: (SubtitleFile) -> Unit,
|
||||
callback: (ExtractorLink) -> Unit,
|
||||
) {
|
||||
val url = if (season == null) {
|
||||
"$smashyStreamAPI/playere.php?tmdb=$tmdbId"
|
||||
"$smashyStreamAPI/playere.php?imdb=$imdbId"
|
||||
} else {
|
||||
"$smashyStreamAPI/playere.php?tmdb=$tmdbId&season=$season&episode=$episode"
|
||||
"$smashyStreamAPI/playere.php?imdb=$imdbId&season=$season&episode=$episode"
|
||||
}
|
||||
|
||||
app.get(
|
||||
url, referer = "https://smashystream.xyz/"
|
||||
url, referer = "https://smashystream.com/"
|
||||
).document.select("div#_default-servers a.server").map {
|
||||
it.attr("data-url") to it.text()
|
||||
it.attr("data-id") to it.text()
|
||||
}.apmap {
|
||||
when {
|
||||
it.second.contains(Regex("(Player F|Player FM)\$")) -> {
|
||||
it.second.contains(Regex("(Player F|Player SE|Player N|Player D)")) -> {
|
||||
invokeSmashyFfix(it.second, it.first, url, callback)
|
||||
}
|
||||
|
||||
it.second.equals("Player FM", true) -> invokeSmashyFm(
|
||||
it.second, it.first, url, callback
|
||||
)
|
||||
|
||||
else -> return@apmap
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue