From 33ff7832355734c818b77c8b19eb76e5d7b7cec6 Mon Sep 17 00:00:00 2001 From: hexated Date: Sat, 4 Feb 2023 23:55:16 +0700 Subject: [PATCH] t4tv: fixed daddy --- TimefourTv/build.gradle.kts | 2 +- TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt | 7 ++++++- .../src/main/kotlin/com/hexated/TimefourTvExtractor.kt | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/TimefourTv/build.gradle.kts b/TimefourTv/build.gradle.kts index 6c49f54e..fa742b08 100644 --- a/TimefourTv/build.gradle.kts +++ b/TimefourTv/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 13 +version = 14 cloudstream { diff --git a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt index 4e873717..0c8aa34b 100644 --- a/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt +++ b/TimefourTv/src/main/kotlin/com/hexated/TimefourTv.kt @@ -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", diff --git a/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt b/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt index 5b6a4cfe..c56fae01 100644 --- a/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt +++ b/TimefourTv/src/main/kotlin/com/hexated/TimefourTvExtractor.kt @@ -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)) }