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