klontv: if /serial/ in player, then no movie

This commit is contained in:
CakesTwix 2023-11-17 21:00:51 +02:00
parent 139062d8a7
commit e7dff2532c
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 5 additions and 2 deletions

View file

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

View file

@ -105,7 +105,7 @@ class KlonTVProvider : MainAPI() {
val year = document.selectFirst(yearSelector)?.text()?.toIntOrNull() val year = document.selectFirst(yearSelector)?.text()?.toIntOrNull()
val playerUrl = document.select(playerSelector).attr("data-src") val playerUrl = document.select(playerSelector).attr("data-src")
val tvType = with(tags){ var tvType = with(tags){
when{ when{
contains("Серіали") -> TvType.TvSeries contains("Серіали") -> TvType.TvSeries
contains("Фільми") -> TvType.Movie contains("Фільми") -> TvType.Movie
@ -115,6 +115,9 @@ class KlonTVProvider : MainAPI() {
else -> TvType.TvSeries else -> TvType.TvSeries
} }
} }
// https://klon.tv/filmy/1783-rik-ta-morti.html not movie
if(playerUrl.contains("/serial/")){ tvType = TvType.TvSeries }
val description = Jsoup.parse(titleJson.description).text() val description = Jsoup.parse(titleJson.description).text()
val recommendations = document.select(recommendationsSelector).map { val recommendations = document.select(recommendationsSelector).map {