fixes #506 - Song list - make columns headers clickable for sorting

This commit is contained in:
Luke Pulverenti
2013-09-06 15:17:15 -04:00
parent 83dd13cc7c
commit 1d9c163f5f
10 changed files with 77 additions and 28 deletions

View File

@@ -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))
{