jellyfin/MediaBrowser.Model/Dlna/SortCriteria.cs

25 lines
514 B
C#
Raw Normal View History

2020-02-04 00:49:27 +00:00
#pragma warning disable CS1591
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
{
public SortCriteria(string sortOrder)
2018-12-27 23:27:57 +00:00
{
if (Enum.TryParse<SortOrder>(sortOrder, true, out var sortOrderValue))
{
SortOrder = sortOrderValue;
}
else
{
SortOrder = SortOrder.Ascending;
}
2018-12-27 23:27:57 +00:00
}
public SortOrder SortOrder { get; }
2018-12-27 23:27:57 +00:00
}
}