split time4tv source

This commit is contained in:
hexated 2022-12-30 19:55:25 +07:00
parent 8a54373ccf
commit 62f184b993
2 changed files with 7 additions and 11 deletions

View file

@ -1,5 +1,5 @@
// use an integer for version numbers
version = 11
version = 12
cloudstream {

View file

@ -3,6 +3,7 @@ package com.hexated
import com.hexated.TimefourTvExtractor.getLink
import com.lagradost.cloudstream3.*
import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import com.lagradost.cloudstream3.utils.Qualities
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
@ -165,16 +166,11 @@ open class TimefourTv : MainAPI() {
} ?: throw ErrorLoadingException()
getLink(fixUrl(link))?.let { m3uLink ->
val url = app.get(m3uLink, referer = "$mainServer/")
callback.invoke(
ExtractorLink(
this.name,
M3u8Helper.generateM3u8(
this.name,
url.url,
referer = "$mainServer/",
quality = Qualities.Unknown.value,
isM3u8 = true,
)
)
"$mainServer/",
).forEach(callback)
}
return true
}