mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
small fix
This commit is contained in:
parent
4d8c548a2f
commit
b74f198e4d
1 changed files with 15 additions and 8 deletions
|
@ -5,6 +5,7 @@ import com.lagradost.cloudstream3.utils.AppUtils.toJson
|
||||||
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
import com.lagradost.cloudstream3.utils.AppUtils.tryParseJson
|
||||||
import com.lagradost.cloudstream3.utils.ExtractorLink
|
import com.lagradost.cloudstream3.utils.ExtractorLink
|
||||||
import com.lagradost.cloudstream3.utils.Qualities
|
import com.lagradost.cloudstream3.utils.Qualities
|
||||||
|
import com.lagradost.cloudstream3.utils.loadExtractor
|
||||||
import org.jsoup.nodes.Element
|
import org.jsoup.nodes.Element
|
||||||
|
|
||||||
class Dubbindo : MainAPI() {
|
class Dubbindo : MainAPI() {
|
||||||
|
@ -88,6 +89,7 @@ class Dubbindo : MainAPI() {
|
||||||
Video(
|
Video(
|
||||||
it.attr("src"),
|
it.attr("src"),
|
||||||
it.attr("size"),
|
it.attr("size"),
|
||||||
|
it.attr("type"),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,6 +109,7 @@ class Dubbindo : MainAPI() {
|
||||||
): Boolean {
|
): Boolean {
|
||||||
|
|
||||||
tryParseJson<List<Video>>(data)?.map { video ->
|
tryParseJson<List<Video>>(data)?.map { video ->
|
||||||
|
if(video.type == "video/mp4" || video.type == "video/x-msvideo" || video.type == "video/x-matroska") {
|
||||||
callback.invoke(
|
callback.invoke(
|
||||||
ExtractorLink(
|
ExtractorLink(
|
||||||
this.name,
|
this.name,
|
||||||
|
@ -116,6 +119,9 @@ class Dubbindo : MainAPI() {
|
||||||
video.res?.toIntOrNull() ?: Qualities.Unknown.value,
|
video.res?.toIntOrNull() ?: Qualities.Unknown.value,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
} else {
|
||||||
|
loadExtractor(video.src ?: return@map, "", subtitleCallback, callback)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
@ -124,6 +130,7 @@ class Dubbindo : MainAPI() {
|
||||||
data class Video(
|
data class Video(
|
||||||
val src: String? = null,
|
val src: String? = null,
|
||||||
val res: String? = null,
|
val res: String? = null,
|
||||||
|
val type: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue