[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:
Jace 2022-04-05 19:48:06 +08:00 committed by GitHub
parent b78a76d927
commit d95dbf92e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View file

@ -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 } }
}
}
}

View file

@ -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">