mirror of
https://github.com/recloudstream/cloudstream-extensions-multilingual.git
synced 2024-08-15 03:15:14 +00:00
fix webflix
This commit is contained in:
parent
28605bded7
commit
b3c10b3088
2 changed files with 8 additions and 4 deletions
|
@ -1,5 +1,5 @@
|
||||||
// use an integer for version numbers
|
// use an integer for version numbers
|
||||||
version = 2
|
version = 3
|
||||||
|
|
||||||
cloudstream {
|
cloudstream {
|
||||||
// All of these properties are optional, you can safely remove them
|
// All of these properties are optional, you can safely remove them
|
||||||
|
|
|
@ -55,7 +55,11 @@ class WebFlixProvider(override var lang: String, override var mainUrl: String, o
|
||||||
val posters: List<Entry>
|
val posters: List<Entry>
|
||||||
)
|
)
|
||||||
|
|
||||||
private data class HomeResponse(val genres: List<HomeReponseGenre>, val channels: List<Entry>, val slides: List<Entry>) {
|
private data class HomeResponse(
|
||||||
|
val genres: List<HomeReponseGenre> = emptyList(),
|
||||||
|
val channels: List<Entry> = emptyList(),
|
||||||
|
// val slides: List<Entry> = emptyList()
|
||||||
|
) {
|
||||||
fun getHomePageLists(provider: WebFlixProvider): List<HomePageList> {
|
fun getHomePageLists(provider: WebFlixProvider): List<HomePageList> {
|
||||||
val lists = mutableListOf<HomePageList>()
|
val lists = mutableListOf<HomePageList>()
|
||||||
if (channels.isNotEmpty()) {
|
if (channels.isNotEmpty()) {
|
||||||
|
@ -64,7 +68,7 @@ class WebFlixProvider(override var lang: String, override var mainUrl: String, o
|
||||||
}
|
}
|
||||||
lists.add(channels.toHomePageList("Channels", provider))
|
lists.add(channels.toHomePageList("Channels", provider))
|
||||||
}
|
}
|
||||||
if (slides.isNotEmpty()) lists.add(slides.toHomePageList("Slides", provider))
|
//if (slides.isNotEmpty()) lists.add(slides.toHomePageList("Slides", provider))
|
||||||
lists.addAll(genres.map { it.toHomePageList(provider) })
|
lists.addAll(genres.map { it.toHomePageList(provider) })
|
||||||
return lists
|
return lists
|
||||||
}
|
}
|
||||||
|
@ -157,7 +161,7 @@ class WebFlixProvider(override var lang: String, override var mainUrl: String, o
|
||||||
}
|
}
|
||||||
TvType.TvSeries -> provider.newTvSeriesSearchResponse(
|
TvType.TvSeries -> provider.newTvSeriesSearchResponse(
|
||||||
title,
|
title,
|
||||||
"${provider.mainUrl}/api/series/by/$id/${provider.magicPath}",
|
"${provider.mainUrl}/api/movie/by/$id/${provider.magicPath}",
|
||||||
TvType.TvSeries
|
TvType.TvSeries
|
||||||
) {
|
) {
|
||||||
posterUrl = image
|
posterUrl = image
|
||||||
|
|
Loading…
Reference in a new issue