mirror of
https://github.com/recloudstream/cloudstream.git
synced 2024-08-15 01:53:11 +00:00
[Bugfix] Include asian drama on Movies/TV preferred media setting. (#910)
* [Bugfix] Include asian drama on Movies/TV preferred media setting. - Add Documentary on preferred media. * added missing value for array
This commit is contained in:
parent
b78a76d927
commit
d95dbf92e6
2 changed files with 10 additions and 6 deletions
|
@ -268,12 +268,14 @@ object APIHolder {
|
|||
} else {
|
||||
// Filter API depending on preferred media type
|
||||
val listEnumAnime = listOf(TvType.Anime, TvType.AnimeMovie, TvType.OVA)
|
||||
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon)
|
||||
val mediaTypeList = if (currentPrefMedia == 1) listEnumMovieTv else listEnumAnime
|
||||
|
||||
val filteredAPI =
|
||||
allApis.filter { api -> api.supportedTypes.any { it in mediaTypeList } }
|
||||
filteredAPI
|
||||
val listEnumMovieTv = listOf(TvType.Movie, TvType.TvSeries, TvType.Cartoon, TvType.AsianDrama)
|
||||
val listEnumDoc = listOf(TvType.Documentary)
|
||||
val mediaTypeList = when (currentPrefMedia) {
|
||||
2 -> listEnumAnime
|
||||
3 -> listEnumDoc
|
||||
else -> listEnumMovieTv
|
||||
}
|
||||
allApis.filter { api -> api.supportedTypes.any { it in mediaTypeList } }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,11 +50,13 @@
|
|||
<item>All</item>
|
||||
<item>Movies and TV</item>
|
||||
<item>Anime</item>
|
||||
<item>Documentary</item>
|
||||
</array>
|
||||
<array name="media_type_pref_values">
|
||||
<item>0</item>
|
||||
<item>1</item>
|
||||
<item>2</item>
|
||||
<item>3</item>
|
||||
</array>
|
||||
|
||||
<array name="video_buffer_length_names">
|
||||
|
|
Loading…
Reference in a new issue