mirror of
https://github.com/hexated/cloudstream-extensions-hexated.git
synced 2024-08-15 00:03:22 +00:00
added Anime Type in Loklok
This commit is contained in:
parent
53fc328f26
commit
85352da28a
2 changed files with 14 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 7
|
version = 8
|
||||||
|
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
|
|
|
@ -136,10 +136,22 @@ class Loklok : MainAPI() {
|
||||||
rec.toSearchResponse()
|
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(
|
return newTvSeriesLoadResponse(
|
||||||
res.name ?: return null,
|
res.name ?: return null,
|
||||||
url,
|
url,
|
||||||
if (data.category == 0) TvType.Movie else TvType.TvSeries,
|
type,
|
||||||
episodes
|
episodes
|
||||||
) {
|
) {
|
||||||
this.posterUrl = res.coverVerticalUrl
|
this.posterUrl = res.coverVerticalUrl
|
||||||
|
|
Loading…
Reference in a new issue