TimefourTv: fix DaddyHD Channels

This commit is contained in:
hexated 2023-07-21 00:49:46 +07:00
parent 8b9a58a5a0
commit 65f5283ae6
3 changed files with 7 additions and 4 deletions

View file

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

View file

@ -19,8 +19,11 @@ open class TimefourTv : MainAPI() {
)
companion object {
const val daddyUrl = "https://daddylive.watch"
val daddyHost: String = URI(daddyUrl).host.split(".").first()
const val daddyUrl = "https://d.daddylivehd.sx"
val daddyHost: String = daddyUrl.getHost()
private fun String.getHost(): String {
return URI(this).host.substringBeforeLast(".").substringAfterLast(".")
}
}
override val mainPage = mainPageOf(

View file

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