mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
sora: update smashy
This commit is contained in:
parent
c424793e9f
commit
a312faa852
3 changed files with 7 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
||||||
import org.jetbrains.kotlin.konan.properties.Properties
|
import org.jetbrains.kotlin.konan.properties.Properties
|
||||||
|
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 185
|
version = 186
|
||||||
|
|
||||||
android {
|
android {
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
|
|
@ -1718,9 +1718,7 @@ object SoraExtractor : SoraStream() {
|
||||||
it.attr("data-id") to it.text()
|
it.attr("data-id") to it.text()
|
||||||
}.apmap {
|
}.apmap {
|
||||||
when {
|
when {
|
||||||
it.second.equals("Player F", true) || it.second.equals(
|
it.second.contains(Regex("(Player F|Player SE|Player N)")) -> {
|
||||||
"Player N", true
|
|
||||||
) -> {
|
|
||||||
invokeSmashyFfix(it.second, it.first, url, callback)
|
invokeSmashyFfix(it.second, it.first, url, callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2168,14 +2166,14 @@ object SoraExtractor : SoraStream() {
|
||||||
callback: (ExtractorLink) -> Unit,
|
callback: (ExtractorLink) -> Unit,
|
||||||
) {
|
) {
|
||||||
val ref = "https://blackvid.space/"
|
val ref = "https://blackvid.space/"
|
||||||
val key = "c3124ecca65f4e72ef5cb39033cdfed69697e94e"
|
val key = "b6055c533c19131a638c3d2299d525d5ec08a814"
|
||||||
val url = if (season == null) {
|
val url = if (season == null) {
|
||||||
"$blackvidAPI/v3/movie/sources/$tmdbId?key=$key"
|
"$blackvidAPI/v3/movie/sources/$tmdbId?key=$key"
|
||||||
} else {
|
} else {
|
||||||
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
"$blackvidAPI/v3/tv/sources/$tmdbId/$season/$episode?key=$key"
|
||||||
}
|
}
|
||||||
|
|
||||||
val data = app.get(url, timeout = 120L, referer = ref).body.bytes().decrypt(key)
|
val data = session.get(url, timeout = 120L, referer = ref).body.bytes().decrypt("2378f8e4e844f2dc839ab48f66e00acc2305a401")
|
||||||
val json = tryParseJson<BlackvidResponses>(data)
|
val json = tryParseJson<BlackvidResponses>(data)
|
||||||
|
|
||||||
json?.sources?.map { source ->
|
json?.sources?.map { source ->
|
||||||
|
|
|
@ -440,7 +440,7 @@ suspend fun invokeSmashyFfix(
|
||||||
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
|
val source = Regex("['\"]?file['\"]?:\\s*\"([^\"]+)").find(res)?.groupValues?.get(1) ?: return
|
||||||
|
|
||||||
source.split(",").map { links ->
|
source.split(",").map { links ->
|
||||||
val quality = Regex("\\[(\\d+)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
val quality = Regex("(?i)\\[(\\d+(?:k|p)?)]").find(links)?.groupValues?.getOrNull(1)?.trim()
|
||||||
val link = links.removePrefix("[$quality]").trim()
|
val link = links.removePrefix("[$quality]").trim()
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
|
@ -448,8 +448,8 @@ suspend fun invokeSmashyFfix(
|
||||||
"Smashy [$name]",
|
"Smashy [$name]",
|
||||||
decode(link).replace("\\/", "/"),
|
decode(link).replace("\\/", "/"),
|
||||||
smashyStreamAPI,
|
smashyStreamAPI,
|
||||||
quality?.toIntOrNull() ?: return@map,
|
getQualityFromName(quality),
|
||||||
isM3u8 = link.contains(".m3u8"),
|
INFER_TYPE,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue