t4tv: fixed daddy

This commit is contained in:
hexated 2023-02-04 23:55:16 +07:00
parent a499f401ae
commit b99e6dad07
3 changed files with 8 additions and 3 deletions

View file

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

View file

@ -6,10 +6,10 @@ import com.lagradost.cloudstream3.utils.ExtractorLink
import com.lagradost.cloudstream3.utils.M3u8Helper
import org.jsoup.Jsoup
import org.jsoup.nodes.Element
import java.net.URI
open class TimefourTv : MainAPI() {
final override var mainUrl = "https://time4tv.stream"
val daddyUrl = "https://daddyhd.com"
override var name = "Time4tv"
override val hasDownloadSupport = false
override val hasMainPage = true
@ -18,6 +18,11 @@ open class TimefourTv : MainAPI() {
TvType.Live
)
companion object {
const val daddyUrl = "https://daddylivehd.sx"
val daddyHost: String = URI(daddyUrl).host.split(".").first()
}
override val mainPage = mainPageOf(
"$mainUrl/tv-channels" to "All Channels",
"$mainUrl/usa-channels" to "USA Channels",

View file

@ -72,7 +72,7 @@ object TimefourTvExtractor : TimefourTv() {
return getSportLink(url)
}
if(url.contains("daddyhd")) {
if(url.contains(daddyHost)) {
mainServer = getBaseUrl(url)
return getFinalLink(app.get(url, referer = daddyUrl))
}