serialno: Fix episode parsing
This commit is contained in:
parent
e0558d9115
commit
213e6a64e9
2 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 4
|
version = 5
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.lagradost
|
package com.lagradost
|
||||||
|
|
||||||
|
import com.lagradost.api.Log
|
||||||
import com.lagradost.cloudstream3.Episode
|
import com.lagradost.cloudstream3.Episode
|
||||||
import com.lagradost.cloudstream3.HomePageResponse
|
import com.lagradost.cloudstream3.HomePageResponse
|
||||||
import com.lagradost.cloudstream3.LoadResponse
|
import com.lagradost.cloudstream3.LoadResponse
|
||||||
|
@ -148,7 +149,7 @@ class SerialnoProvider : MainAPI() {
|
||||||
callback: (ExtractorLink) -> Unit
|
callback: (ExtractorLink) -> Unit
|
||||||
): Boolean {
|
): Boolean {
|
||||||
val dataList = data.split(", ")
|
val dataList = data.split(", ")
|
||||||
|
Log.d("CakesTwix-Debug", data)
|
||||||
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
val playerRawJson = app.get(dataList[2]).document.select("script").html()
|
||||||
.substringAfterLast("file: \'")
|
.substringAfterLast("file: \'")
|
||||||
.substringBefore("\',")
|
.substringBefore("\',")
|
||||||
|
@ -164,6 +165,14 @@ class SerialnoProvider : MainAPI() {
|
||||||
streamUrl = episode.file,
|
streamUrl = episode.file,
|
||||||
referer = "https://tortuga.wtf/"
|
referer = "https://tortuga.wtf/"
|
||||||
).last().let(callback)
|
).last().let(callback)
|
||||||
|
|
||||||
|
if(episode.subtitle.isNullOrBlank()) return true
|
||||||
|
subtitleCallback.invoke(
|
||||||
|
SubtitleFile(
|
||||||
|
episode.subtitle.substringAfterLast("[").substringBefore("]"),
|
||||||
|
episode.subtitle.substringAfter("]")
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue