aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index b188d701f..bdaad49e6 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -244,7 +244,7 @@ namespace MediaBrowser.Api.UserLibrary
return (PersonTypes ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
}
- public IEnumerable<VideoType> GetVideoTypes()
+ public VideoType[] GetVideoTypes()
{
var val = VideoTypes;
@@ -253,7 +253,7 @@ namespace MediaBrowser.Api.UserLibrary
return new VideoType[] { };
}
- return val.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(v => (VideoType)Enum.Parse(typeof(VideoType), v, true));
+ return val.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(v => (VideoType)Enum.Parse(typeof(VideoType), v, true)).ToArray();
}
}
@@ -933,7 +933,7 @@ namespace MediaBrowser.Api.UserLibrary
// Filter by VideoType
var videoTypes = request.GetVideoTypes();
- if (video == null || !videoTypes.Contains(video.VideoType))
+ if (videoTypes.Length > 0 && (video == null || !videoTypes.Contains(video.VideoType)))
{
return false;
}