From 7dfce0f19e0f4a2ed7c93878956a0591f7d89885 Mon Sep 17 00:00:00 2001 From: krishus96 <47269132+krishus96@users.noreply.github.com> Date: Sat, 9 Dec 2023 01:32:15 +0530 Subject: [PATCH] Update SoraExtractor.kt smashy update (#437) --- .../main/kotlin/com/hexated/SoraExtractor.kt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt index 40a77af0..eb10fd83 100644 --- a/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt +++ b/SoraStream/src/main/kotlin/com/hexated/SoraExtractor.kt @@ -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 } }