TimefourTv: added search page

This commit is contained in:
sora 2023-09-10 19:56:48 +07:00
parent 62cab062e3
commit 18c07cc069
2 changed files with 8 additions and 1 deletions

View file

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

View file

@ -110,6 +110,13 @@ open class TimefourTv : MainAPI() {
}
override suspend fun search(query: String): List<SearchResponse> {
val document = app.get("$daddyUrl/24-7-channels.php").document
return document.select("div.grid-container div.grid-item:contains($query)").mapNotNull {
it.toSearchDaddy()
}
}
private suspend fun loadSchedule(url: String): LoadResponse {
val name = url.removePrefix("$mainUrl/")
val doc = app.get("$mainUrl/schedule.php").document