Merge pull request #6808 from cvium/dlnope_never_again

This commit is contained in:
Cody Robibero
2021-11-09 20:34:09 -07:00
committed by GitHub
3 changed files with 365 additions and 801 deletions

View File

@@ -1,15 +1,24 @@
#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Dlna
{
public class SortCriteria
{
public SortCriteria(string value)
public SortCriteria(string sortOrder)
{
if (!string.IsNullOrEmpty(sortOrder) && Enum.TryParse<SortOrder>(sortOrder, true, out var sortOrderValue))
{
SortOrder = sortOrderValue;
}
else
{
SortOrder = SortOrder.Ascending;
}
}
public SortOrder SortOrder => SortOrder.Ascending;
public SortOrder SortOrder { get; }
}
}