ufdub: fix tvType

This commit is contained in:
CakesTwix 2023-08-07 23:36:35 +03:00
parent 088473907d
commit 4052315c08
Signed by: CakesTwix
GPG key ID: 7B11051D5CE19825
2 changed files with 13 additions and 3 deletions

View file

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

View file

@ -86,8 +86,6 @@ class UFDubProvider : MainAPI() {
val tags = mutableListOf<String>()
val year = someInfo.select("strong:contains(Рік випуску аніме:)").next().html().toIntOrNull()
// TODO: Check type by url
val tvType = TvType.Anime
val description = document.select("div.full-text p").text()
// val author = someInfo.select("strong:contains(Студія:)").next().html()
val rating = toRatingInt(document.select(".fp-rate"))
@ -105,6 +103,18 @@ class UFDubProvider : MainAPI() {
}
}
val tvType = with(tags){
when{
contains("Фільми") -> TvType.Movie
contains("Мультсеріали") -> TvType.Cartoon
contains("Серіали") -> TvType.TvSeries
contains("Мультфільми") -> TvType.Movie
contains("Аніме") -> TvType.Anime
contains("Дорами") -> TvType.AsianDrama
else -> TvType.TvSeries
}
}
// Parse episodes
val episodes = mutableListOf<Episode>()
// Get Player URL