diff --git a/Loklok/build.gradle.kts b/Loklok/build.gradle.kts index 73838069..b3f25cdc 100644 --- a/Loklok/build.gradle.kts +++ b/Loklok/build.gradle.kts @@ -1,5 +1,5 @@ // use an integer for version numbers -version = 7 +version = 8 cloudstream { diff --git a/Loklok/src/main/kotlin/com/hexated/Loklok.kt b/Loklok/src/main/kotlin/com/hexated/Loklok.kt index a57d9d61..3adefe45 100644 --- a/Loklok/src/main/kotlin/com/hexated/Loklok.kt +++ b/Loklok/src/main/kotlin/com/hexated/Loklok.kt @@ -136,10 +136,22 @@ class Loklok : MainAPI() { rec.toSearchResponse() } + val type = when { + data.category == 0 -> { + TvType.Movie + } + data.category != 0 && res.tagNameList?.contains("Anime") == true -> { + TvType.Anime + } + else -> { + TvType.TvSeries + } + } + return newTvSeriesLoadResponse( res.name ?: return null, url, - if (data.category == 0) TvType.Movie else TvType.TvSeries, + type, episodes ) { this.posterUrl = res.coverVerticalUrl