mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
TimefourTv: fix DaddyHD Channels
This commit is contained in:
parent
8b9a58a5a0
commit
65f5283ae6
3 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 14
|
version = 15
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -19,8 +19,11 @@ open class TimefourTv : MainAPI() {
|
||||||
)
|
)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val daddyUrl = "https://daddylive.watch"
|
const val daddyUrl = "https://d.daddylivehd.sx"
|
||||||
val daddyHost: String = URI(daddyUrl).host.split(".").first()
|
val daddyHost: String = daddyUrl.getHost()
|
||||||
|
private fun String.getHost(): String {
|
||||||
|
return URI(this).host.substringBeforeLast(".").substringAfterLast(".")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override val mainPage = mainPageOf(
|
override val mainPage = mainPageOf(
|
||||||
|
|
|
@ -72,7 +72,7 @@ object TimefourTvExtractor : TimefourTv() {
|
||||||
return getSportLink(url)
|
return getSportLink(url)
|
||||||
}
|
}
|
||||||
|
|
||||||
if(url.contains(daddyHost)) {
|
if(url.contains(daddyHost, true)) {
|
||||||
mainServer = getBaseUrl(url)
|
mainServer = getBaseUrl(url)
|
||||||
return getFinalLink(app.get(url, referer = daddyUrl))
|
return getFinalLink(app.get(url, referer = daddyUrl))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue