mirror of
https://github.com/recloudstream/cloudstream-extensions.git
synced 2024-08-15 03:03:54 +00:00
Additional fix for 2embed
This commit is contained in:
parent
f4d7be4c39
commit
857ffe83d5
3 changed files with 10 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 3
|
||||
version = 4
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -318,15 +318,6 @@ open class SflixProvider : MainAPI() {
|
|||
// @JsonProperty("title") val title: String? = null
|
||||
)
|
||||
|
||||
|
||||
open suspend fun getKey(): String? {
|
||||
data class KeyObject(
|
||||
@JsonProperty("key") val key: String? = null
|
||||
)
|
||||
return app.get("https://raw.githubusercontent.com/chenkaslowankiya/BruhGlow/main/keys.json")
|
||||
.parsed<KeyObject>().key
|
||||
}
|
||||
|
||||
override suspend fun loadLinks(
|
||||
data: String,
|
||||
isCasting: Boolean,
|
||||
|
@ -467,6 +458,13 @@ open class SflixProvider : MainAPI() {
|
|||
return code.reversed()
|
||||
}
|
||||
|
||||
suspend fun getKey(): String? {
|
||||
data class KeyObject(
|
||||
@JsonProperty("key") val key: String? = null
|
||||
)
|
||||
return app.get("https://raw.githubusercontent.com/chenkaslowankiya/BruhGlow/main/keys.json")
|
||||
.parsed<KeyObject>().key
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a session
|
||||
|
@ -643,7 +641,7 @@ open class SflixProvider : MainAPI() {
|
|||
extractorData = extractorData
|
||||
)
|
||||
}
|
||||
} ?: listOf(
|
||||
}.takeIf { !it.isNullOrEmpty() } ?: listOf(
|
||||
// Fallback if m3u8 extractor fails
|
||||
ExtractorLink(
|
||||
caller.name,
|
||||
|
@ -795,7 +793,6 @@ open class SflixProvider : MainAPI() {
|
|||
response.parsedSafe()
|
||||
} ?: return@suspendSafeApiCall
|
||||
|
||||
|
||||
sourceObject.tracks?.forEach { track ->
|
||||
track?.toSubtitleFile()?.let { subtitleFile ->
|
||||
subtitleCallback.invoke(subtitleFile)
|
||||
|
|
|
@ -64,7 +64,7 @@ class TwoEmbedProvider : TmdbProvider() {
|
|||
val mappedservers = parseJson<EmbedJson>(ajax)
|
||||
val iframeLink = mappedservers.link
|
||||
if (iframeLink.contains("rabbitstream")) {
|
||||
extractRabbitStream(iframeLink, subtitleCallback, callback, false) { it }
|
||||
extractRabbitStream(iframeLink, subtitleCallback, callback, false, decryptKey = SflixProvider.getKey()) { it }
|
||||
} else {
|
||||
loadExtractor(iframeLink, embedUrl, subtitleCallback, callback)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue