aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Api/UserLibrary/ItemsService.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-06 15:17:15 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-09-06 15:17:15 -0400
commit1d9c163f5ff0207442ff008d8799a5bc602c3d39 (patch)
tree424dac5f9cb1cba36d1fe8fb6f3581cf0aeb5a99 /MediaBrowser.Api/UserLibrary/ItemsService.cs
parent83dd13cc7c72b8f63f049db3ed5582ef084426aa (diff)
fixes #506 - Song list - make columns headers clickable for sorting
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/ItemsService.cs')
-rw-r--r--MediaBrowser.Api/UserLibrary/ItemsService.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs
index 288b67057..c9218c6b5 100644
--- a/MediaBrowser.Api/UserLibrary/ItemsService.cs
+++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs
@@ -126,6 +126,9 @@ namespace MediaBrowser.Api.UserLibrary
[ApiMember(Name = "NameStartsWithOrGreater", Description = "Optional filter by items whose name is sorted equally or greater than a given input string.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
public string NameStartsWithOrGreater { get; set; }
+ [ApiMember(Name = "AlbumArtistStartsWithOrGreater", Description = "Optional filter by items whose album artist is sorted equally or greater than a given input string.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
+ public string AlbumArtistStartsWithOrGreater { get; set; }
+
/// <summary>
/// Gets or sets the air days.
/// </summary>
@@ -576,6 +579,13 @@ namespace MediaBrowser.Api.UserLibrary
items = items.Where(i => string.Compare(request.NameStartsWithOrGreater, i.SortName, StringComparison.CurrentCultureIgnoreCase) < 1);
}
+ if (!string.IsNullOrEmpty(request.AlbumArtistStartsWithOrGreater))
+ {
+ items = items.OfType<IHasAlbumArtist>()
+ .Where(i => string.Compare(request.AlbumArtistStartsWithOrGreater, i.AlbumArtist, StringComparison.CurrentCultureIgnoreCase) < 1)
+ .Cast<BaseItem>();
+ }
+
// Filter by Series Status
if (!string.IsNullOrEmpty(request.SeriesStatus))
{