unified the two sorting api's

This commit is contained in:
LukePulverenti
2013-03-09 23:22:36 -05:00
parent 913cb3c564
commit 31d079f1ba
30 changed files with 676 additions and 660 deletions

View File

@@ -315,13 +315,6 @@ namespace MediaBrowser.Model.Dto
[ProtoMember(52)]
public List<DayOfWeek> AirDays { get; set; }
/// <summary>
/// Gets or sets the sort options.
/// </summary>
/// <value>The sort options.</value>
[ProtoMember(53)]
public string[] SortOptions { get; set; }
/// <summary>
/// Gets or sets the index options.
/// </summary>

View File

@@ -86,11 +86,6 @@ namespace MediaBrowser.Model.Dto
/// </summary>
SortName,
/// <summary>
/// The fields that the server supports sorting on
/// </summary>
SortOptions,
/// <summary>
/// The studios of the item
/// </summary>

View File

@@ -36,7 +36,7 @@ namespace MediaBrowser.Model.Dto
/// What to sort the results by
/// </summary>
/// <value>The sort by.</value>
public ItemSortBy[] SortBy { get; set; }
public string[] SortBy { get; set; }
/// <summary>
/// The sort order to return results with
@@ -116,12 +116,6 @@ namespace MediaBrowser.Model.Dto
/// <value>The index by.</value>
public string IndexBy { get; set; }
/// <summary>
/// The dynamic, localized sort function name
/// </summary>
/// <value>The dynamic sort by.</value>
public string DynamicSortBy { get; set; }
/// <summary>
/// Gets or sets the image types.
/// </summary>

View File

@@ -2,41 +2,53 @@
namespace MediaBrowser.Model.Dto
{
/// <summary>
/// Enum ItemSortBy
/// These represent sort orders that are known by the core
/// </summary>
public enum ItemSortBy
public static class ItemSortBy
{
/// <summary>
/// The album
/// </summary>
Album,
public const string Album = "Album";
/// <summary>
/// The album artist
/// </summary>
AlbumArtist,
public const string AlbumArtist = "AlbumArtist";
/// <summary>
/// The artist
/// </summary>
Artist,
public const string Artist = "Artist";
/// <summary>
/// The date created
/// </summary>
DateCreated,
public const string DateCreated = "DateCreated";
/// <summary>
/// The date played
/// </summary>
DatePlayed,
public const string DatePlayed = "DatePlayed";
/// <summary>
/// The premiere date
/// </summary>
PremiereDate,
public const string PremiereDate = "PremiereDate";
/// <summary>
/// The sort name
/// </summary>
SortName,
public const string SortName = "SortName";
/// <summary>
/// The random
/// </summary>
Random
public const string Random = "Random";
/// <summary>
/// The runtime
/// </summary>
public const string Runtime = "Runtime";
/// <summary>
/// The community rating
/// </summary>
public const string CommunityRating = "CommunityRating";
/// <summary>
/// The production year
/// </summary>
public const string ProductionYear = "ProductionYear";
}
}