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
|
||||
version = 2
|
||||
version = 3
|
||||
|
||||
cloudstream {
|
||||
// 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>
|
||||
)
|
||||
|
||||
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> {
|
||||
val lists = mutableListOf<HomePageList>()
|
||||
if (channels.isNotEmpty()) {
|
||||
|
@ -64,7 +68,7 @@ class WebFlixProvider(override var lang: String, override var mainUrl: String, o
|
|||
}
|
||||
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) })
|
||||
return lists
|
||||
}
|
||||
|
@ -157,7 +161,7 @@ class WebFlixProvider(override var lang: String, override var mainUrl: String, o
|
|||
}
|
||||
TvType.TvSeries -> provider.newTvSeriesSearchResponse(
|
||||
title,
|
||||
"${provider.mainUrl}/api/series/by/$id/${provider.magicPath}",
|
||||
"${provider.mainUrl}/api/movie/by/$id/${provider.magicPath}",
|
||||
TvType.TvSeries
|
||||
) {
|
||||
posterUrl = image
|
||||
|
|
Loading…
Reference in a new issue