From 29e1330c3acb1594301f0e89266da79781d50bed Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 24 Apr 2013 16:28:42 -0400 Subject: [PATCH] improved games display --- MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs | 8 ++++++++ MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs | 8 ++++++++ MediaBrowser.Api/UserLibrary/ItemsService.cs | 7 ------- MediaBrowser.WebDashboard/Api/DashboardService.cs | 1 - .../MediaBrowser.WebDashboard.csproj | 6 ------ 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs index 7305dfe3bb..fd992c423d 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsByNameService.cs @@ -220,6 +220,14 @@ namespace MediaBrowser.Api.UserLibrary items = items.Where(f => vals.Contains(f.GetType().Name, StringComparer.OrdinalIgnoreCase)); } + // Include MediaTypes + if (!string.IsNullOrEmpty(request.MediaTypes)) + { + var vals = request.MediaTypes.Split(','); + + items = items.Where(f => vals.Contains(f.MediaType ?? string.Empty, StringComparer.OrdinalIgnoreCase)); + } + return items; } diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs index 7dcce53b2c..27f124e47c 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs @@ -71,6 +71,14 @@ namespace MediaBrowser.Api.UserLibrary /// The filters. [ApiMember(Name = "Filters", Description = "Optional. Specify additional filters to apply. This allows multiple, comma delimeted. Options: IsFolder, IsNotFolder, IsUnplayed, IsPlayed, IsFavorite, IsRecentlyAdded, IsResumable, Likes, Dislikes", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Filters { get; set; } + + /// + /// Gets or sets the media types. + /// + /// The media types. + [ApiMember(Name = "MediaTypes", Description = "Optional filter by MediaType. Allows multiple, comma delimited.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] + public string MediaTypes { get; set; } + /// /// Gets the filters. diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index 6853e3cd5d..baa47e7875 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -105,13 +105,6 @@ namespace MediaBrowser.Api.UserLibrary [ApiMember(Name = "Ids", Description = "Optional. If specific items are needed, specify a list of item id's to retrieve. This allows multiple, comma delimited.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] public string Ids { get; set; } - /// - /// Gets or sets the media types. - /// - /// The media types. - [ApiMember(Name = "MediaTypes", Description = "Optional filter by MediaType. Allows multiple, comma delimited.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)] - public string MediaTypes { get; set; } - /// /// Gets or sets the video types. /// diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 8660e8816f..bf5428649e 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -459,7 +459,6 @@ namespace MediaBrowser.WebDashboard.Api "gamespage.js", "gamegenrepage.js", "gamestudiospage.js", - "gamedetailpage.js", "indexpage.js", "itembynamedetailpage.js", "itemdetailpage.js", diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index 8e4d20a785..f90a7b99fa 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -180,9 +180,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest @@ -255,9 +252,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest