mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 13:57:14 -04:00
* Don't check for null before * Don't try different formats when not needed (NumberFormat.Integer is the fast path)
25 lines
514 B
C#
25 lines
514 B
C#
#pragma warning disable CS1591
|
|
|
|
using System;
|
|
using Jellyfin.Data.Enums;
|
|
|
|
namespace MediaBrowser.Model.Dlna
|
|
{
|
|
public class SortCriteria
|
|
{
|
|
public SortCriteria(string sortOrder)
|
|
{
|
|
if (Enum.TryParse<SortOrder>(sortOrder, true, out var sortOrderValue))
|
|
{
|
|
SortOrder = sortOrderValue;
|
|
}
|
|
else
|
|
{
|
|
SortOrder = SortOrder.Ascending;
|
|
}
|
|
}
|
|
|
|
public SortOrder SortOrder { get; }
|
|
}
|
|
}
|