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
|
// use an integer for version numbers
|
||||||
version = 3
|
version = 4
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -318,15 +318,6 @@ open class SflixProvider : MainAPI() {
|
||||||
// @JsonProperty("title") val title: String? = null
|
// @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(
|
override suspend fun loadLinks(
|
||||||
data: String,
|
data: String,
|
||||||
isCasting: Boolean,
|
isCasting: Boolean,
|
||||||
|
@ -467,6 +458,13 @@ open class SflixProvider : MainAPI() {
|
||||||
return code.reversed()
|
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
|
* Generates a session
|
||||||
|
@ -643,7 +641,7 @@ open class SflixProvider : MainAPI() {
|
||||||
extractorData = extractorData
|
extractorData = extractorData
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} ?: listOf(
|
}.takeIf { !it.isNullOrEmpty() } ?: listOf(
|
||||||
// Fallback if m3u8 extractor fails
|
// Fallback if m3u8 extractor fails
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
caller.name,
|
caller.name,
|
||||||
|
@ -795,7 +793,6 @@ open class SflixProvider : MainAPI() {
|
||||||
response.parsedSafe()
|
response.parsedSafe()
|
||||||
} ?: return@suspendSafeApiCall
|
} ?: return@suspendSafeApiCall
|
||||||
|
|
||||||
|
|
||||||
sourceObject.tracks?.forEach { track ->
|
sourceObject.tracks?.forEach { track ->
|
||||||
track?.toSubtitleFile()?.let { subtitleFile ->
|
track?.toSubtitleFile()?.let { subtitleFile ->
|
||||||
subtitleCallback.invoke(subtitleFile)
|
subtitleCallback.invoke(subtitleFile)
|
||||||
|
|
|
@ -64,7 +64,7 @@ class TwoEmbedProvider : TmdbProvider() {
|
||||||
val mappedservers = parseJson<EmbedJson>(ajax)
|
val mappedservers = parseJson<EmbedJson>(ajax)
|
||||||
val iframeLink = mappedservers.link
|
val iframeLink = mappedservers.link
|
||||||
if (iframeLink.contains("rabbitstream")) {
|
if (iframeLink.contains("rabbitstream")) {
|
||||||
extractRabbitStream(iframeLink, subtitleCallback, callback, false) { it }
|
extractRabbitStream(iframeLink, subtitleCallback, callback, false, decryptKey = SflixProvider.getKey()) { it }
|
||||||
} else {
|
} else {
|
||||||
loadExtractor(iframeLink, embedUrl, subtitleCallback, callback)
|
loadExtractor(iframeLink, embedUrl, subtitleCallback, callback)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue