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)) }