From 06298d489c5e1e9689b1ca4853fd27787057a1ca Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 10 Sep 2013 15:57:38 -0400 Subject: [PATCH] fixes #530 - Add ability to sort movie genres/studios/people by movie or trailer count --- .../UserLibrary/ArtistsService.cs | 4 +- .../UserLibrary/BaseItemsByNameService.cs | 113 +++--------------- .../UserLibrary/BaseItemsRequest.cs | 23 ++++ .../UserLibrary/GameGenresService.cs | 4 +- MediaBrowser.Api/UserLibrary/GenresService.cs | 4 +- MediaBrowser.Api/UserLibrary/ItemsService.cs | 25 +--- .../UserLibrary/MusicGenresService.cs | 4 +- .../UserLibrary/PersonsService.cs | 4 +- .../UserLibrary/StudiosService.cs | 4 +- MediaBrowser.Api/UserLibrary/YearsService.cs | 4 +- MediaBrowser.Model/Querying/ItemSortBy.cs | 2 + ...MediaBrowser.Server.Implementations.csproj | 2 + .../Sorting/EpisodeCountComparer.cs | 76 ++++++++++++ .../Sorting/SeriesCountComparer.cs | 76 ++++++++++++ 14 files changed, 212 insertions(+), 133 deletions(-) create mode 100644 MediaBrowser.Server.Implementations/Sorting/EpisodeCountComparer.cs create mode 100644 MediaBrowser.Server.Implementations/Sorting/SeriesCountComparer.cs diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs index d9db48a30..c7da4a361 100644 --- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs +++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs @@ -110,7 +110,7 @@ namespace MediaBrowser.Api.UserLibrary /// The request. /// The items. /// IEnumerable{Tuple{System.StringFunc{System.Int32}}}. - protected override IEnumerable> GetAllItems(GetItemsByName request, IEnumerable items) + protected override IEnumerable> GetAllItems(GetItemsByName request, IEnumerable items) { var itemsList = items.OfType