removed Youtube from source

This commit is contained in:
hexated 2022-11-08 18:06:03 +07:00
parent c26fdc1724
commit 9640c985a2
4 changed files with 7 additions and 14 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 18
version = 19
cloudstream {

View file

@ -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 -> {}
}
}
}

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 25
version = 26
cloudstream {

View file

@ -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