mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
update extractor
This commit is contained in:
parent
2a1876f54c
commit
5a0af1c924
1 changed files with 17 additions and 3 deletions
|
@ -43,9 +43,9 @@ open class Vidplay : ExtractorApi() {
|
||||||
"Accept" to "application/json, text/javascript, */*; q=0.01",
|
"Accept" to "application/json, text/javascript, */*; q=0.01",
|
||||||
"X-Requested-With" to "XMLHttpRequest",
|
"X-Requested-With" to "XMLHttpRequest",
|
||||||
), referer = url
|
), referer = url
|
||||||
).parsedSafe<Response>()?.result?.sources
|
).parsedSafe<Response>()?.result
|
||||||
|
|
||||||
res?.map {
|
res?.sources?.map {
|
||||||
M3u8Helper.generateM3u8(
|
M3u8Helper.generateM3u8(
|
||||||
this.name,
|
this.name,
|
||||||
it.file ?: return@map,
|
it.file ?: return@map,
|
||||||
|
@ -53,6 +53,14 @@ open class Vidplay : ExtractorApi() {
|
||||||
).forEach(callback)
|
).forEach(callback)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
res?.tracks?.forEach {
|
||||||
|
val subtitle = it.file ?: return@forEach
|
||||||
|
val lang = it.label ?: return@forEach
|
||||||
|
subtitleCallback.invoke(
|
||||||
|
SubtitleFile(lang, subtitle)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private suspend fun getKeys(): List<String> {
|
private suspend fun getKeys(): List<String> {
|
||||||
|
@ -92,8 +100,14 @@ open class Vidplay : ExtractorApi() {
|
||||||
@JsonProperty("file") val file: String? = null,
|
@JsonProperty("file") val file: String? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class Tracks(
|
||||||
|
@JsonProperty("file") var file: String? = null,
|
||||||
|
@JsonProperty("label") var label: String? = null,
|
||||||
|
)
|
||||||
|
|
||||||
data class Result(
|
data class Result(
|
||||||
@JsonProperty("sources") val sources: ArrayList<Sources>? = arrayListOf(),
|
@JsonProperty("sources") val sources: List<Sources> = emptyList(),
|
||||||
|
@JsonProperty("tracks") var tracks: List<Tracks> = emptyList()
|
||||||
)
|
)
|
||||||
|
|
||||||
data class Response(
|
data class Response(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue