2020-02-04 00:49:27 +00:00
|
|
|
#pragma warning disable CS1591
|
|
|
|
|
2021-11-09 18:31:54 +00:00
|
|
|
using System;
|
2020-07-01 01:44:41 +00:00
|
|
|
using Jellyfin.Data.Enums;
|
2018-12-27 23:27:57 +00:00
|
|
|
|
|
|
|
namespace MediaBrowser.Model.Dlna
|
|
|
|
{
|
|
|
|
public class SortCriteria
|
|
|
|
{
|
2021-11-09 18:31:54 +00:00
|
|
|
public SortCriteria(string sortOrder)
|
2018-12-27 23:27:57 +00:00
|
|
|
{
|
2021-11-09 18:31:54 +00:00
|
|
|
if (!string.IsNullOrEmpty(sortOrder) && Enum.TryParse<SortOrder>(sortOrder, true, out var sortOrderValue))
|
|
|
|
{
|
|
|
|
SortOrder = sortOrderValue;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
SortOrder = SortOrder.Ascending;
|
|
|
|
}
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
2021-02-20 22:13:04 +00:00
|
|
|
|
2021-11-09 18:31:54 +00:00
|
|
|
public SortOrder SortOrder { get; }
|
2018-12-27 23:27:57 +00:00
|
|
|
}
|
|
|
|
}
|