forked from recloudstream/cloudstream
uhh
This commit is contained in:
parent
afdafc3dac
commit
8e29f84f0b
1 changed files with 4 additions and 4 deletions
|
@ -229,13 +229,13 @@ class TrailersToProvider : MainAPI() {
|
||||||
val titleHeader = main.selectFirst("a")
|
val titleHeader = main.selectFirst("a")
|
||||||
val titleName = titleHeader.text()
|
val titleName = titleHeader.text()
|
||||||
val href = fixUrl(titleHeader.attr("href"))
|
val href = fixUrl(titleHeader.attr("href"))
|
||||||
val gValues = Regex(""".*?Season ([0-9]+)\s-\s(?:Episode )?([0-9]+)?(?:: )?(.*)""").find(titleName)!!.destructured
|
val gValues = Regex(""".*?Season ([0-9]+)\s-\s(?:Episode )?([0-9]+)?(?:: )?(.*)""").find(titleName)?.destructured
|
||||||
val season = gValues.component1().toIntOrNull()
|
val season = gValues?.component1()?.toIntOrNull()
|
||||||
var episode = gValues.component2().toIntOrNull()
|
var episode = gValues?.component2()?.toIntOrNull()
|
||||||
if (episode == null) {
|
if (episode == null) {
|
||||||
episode = index + 1
|
episode = index + 1
|
||||||
}
|
}
|
||||||
val epName = if (!gValues.component3().isEmpty()) gValues.component3() else "Episode ${gValues.component2()}"
|
val epName = if (gValues?.component3()?.isNotEmpty() == true) gValues.component3() else "Episode ${gValues?.component2()}"
|
||||||
val infoHeaders = main.select("span.small-text")
|
val infoHeaders = main.select("span.small-text")
|
||||||
val date = infoHeaders?.get(0)?.text()
|
val date = infoHeaders?.get(0)?.text()
|
||||||
val ratingText = infoHeaders?.get(1)?.text()?.replace("/ 10", "")
|
val ratingText = infoHeaders?.get(1)?.text()?.replace("/ 10", "")
|
||||||
|
|
Loading…
Reference in a new issue