mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
removed Youtube from source
This commit is contained in:
parent
c26fdc1724
commit
9640c985a2
4 changed files with 7 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 18
|
||||
version = 19
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -249,7 +249,8 @@ class Movierulzhd : MainAPI() {
|
|||
// source.startsWith("https://series.databasegdriveplayer.co") -> {
|
||||
// invokeDatabase(source, callback, subtitleCallback)
|
||||
// }
|
||||
else -> loadExtractor(source, data, subtitleCallback, callback)
|
||||
!source.contains("youtube") -> loadExtractor(source, data, subtitleCallback, callback)
|
||||
else -> {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// use an integer for version numbers
|
||||
version = 25
|
||||
version = 26
|
||||
|
||||
|
||||
cloudstream {
|
||||
|
|
|
@ -515,7 +515,9 @@ object SoraExtractor : SoraStream() {
|
|||
referer = url
|
||||
).parsed<ResponseHash>().embed_url
|
||||
|
||||
if(!source.contains("youtube")) {
|
||||
loadExtractor(source, "$idlixAPI/", subtitleCallback, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -833,7 +835,7 @@ object SoraExtractor : SoraStream() {
|
|||
json?.subtitlingList?.map { sub ->
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
getVipLanguage(sub.languageAbbr ?: return@map),
|
||||
sub.language ?: "",
|
||||
sub.subtitlingUrl ?: return@map
|
||||
)
|
||||
)
|
||||
|
@ -905,16 +907,6 @@ fun getLanguage(str: String): String {
|
|||
return if (str.contains("(in_ID)")) "Indonesian" else str
|
||||
}
|
||||
|
||||
private fun getVipLanguage(str: String): String {
|
||||
return when (str) {
|
||||
"in_ID" -> "Indonesian"
|
||||
"pt" -> "Portuguese"
|
||||
else -> str.split("_").first().let {
|
||||
SubtitleHelper.fromTwoLettersToLanguage(it).toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun getQuality(str: String): Int {
|
||||
return when (str) {
|
||||
"360p" -> Qualities.P240.value
|
||||
|
|
Loading…
Reference in a new issue