mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
small fix XStreamCdn sub
This commit is contained in:
parent
7a169dae7e
commit
a8c1f8e377
1 changed files with 4 additions and 3 deletions
|
@ -78,13 +78,14 @@ open class XStreamCdn : ExtractorApi() {
|
|||
@JsonProperty("success") val success: Boolean,
|
||||
@JsonProperty("player") val player: Player? = null,
|
||||
@JsonProperty("data") val data: List<ResponseData>?,
|
||||
@JsonProperty("captions") val captions: List<Captions>?,
|
||||
@JsonProperty("captions") val captions: List<Captions?>?,
|
||||
)
|
||||
|
||||
private data class Captions(
|
||||
@JsonProperty("id") val id: String,
|
||||
@JsonProperty("hash") val hash: String,
|
||||
@JsonProperty("language") val language: String,
|
||||
@JsonProperty("extension") val extension: String
|
||||
)
|
||||
|
||||
override fun getExtractorUrl(id: String): String {
|
||||
|
@ -125,8 +126,8 @@ open class XStreamCdn : ExtractorApi() {
|
|||
sources?.captions?.map {
|
||||
subtitleCallback.invoke(
|
||||
SubtitleFile(
|
||||
it.language,
|
||||
"$mainUrl/asset/userdata/$userData/caption/${it.hash}/${it.id}.srt"
|
||||
it?.language.toString(),
|
||||
"$mainUrl/asset/userdata/$userData/caption/${it?.hash}/${it?.id}.${it?.extension}"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue