jellyfin/MediaBrowser.Model/Dlna/SortCriteria.cs

25 lines
550 B
C#
Raw Normal View History

2020-02-03 17:49:27 -07:00
#pragma warning disable CS1591
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
{
public SortCriteria(string sortOrder)
2018-12-27 16:27:57 -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
}
public SortOrder SortOrder { get; }
2018-12-27 16:27:57 -07:00
}
}