mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
fixes #536 - Add special feature filter to tv shows page
This commit is contained in:
parent
51a388939f
commit
99d5453a5c
@ -669,7 +669,30 @@ namespace MediaBrowser.Api.UserLibrary
|
||||
|
||||
if (request.HasSpecialFeature.HasValue)
|
||||
{
|
||||
items = items.OfType<Movie>().Where(i => request.HasSpecialFeature.Value ? i.SpecialFeatureIds.Count > 0 : i.SpecialFeatureIds.Count == 0);
|
||||
var filterValue = request.HasSpecialFeature.Value;
|
||||
|
||||
items = items.Where(i =>
|
||||
{
|
||||
var movie = i as Movie;
|
||||
|
||||
if (movie != null)
|
||||
{
|
||||
return filterValue
|
||||
? movie.SpecialFeatureIds.Count > 0
|
||||
: movie.SpecialFeatureIds.Count == 0;
|
||||
}
|
||||
|
||||
var series = i as Series;
|
||||
|
||||
if (series != null)
|
||||
{
|
||||
return filterValue
|
||||
? series.SpecialFeatureIds.Count > 0
|
||||
: series.SpecialFeatureIds.Count == 0;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
if (request.HasSubtitles.HasValue)
|
||||
|
Loading…
Reference in New Issue
Block a user