make Sort private and use Enum parse
This commit is contained in:
parent
0b7dc7ff64
commit
4344b951a6
|
@ -112,13 +112,11 @@ namespace MediaBrowser.Controller.Entities.Movies
|
|||
return true;
|
||||
}
|
||||
|
||||
public IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user)
|
||||
private IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user)
|
||||
{
|
||||
var sortBy = ItemSortBy.PremiereDate;
|
||||
|
||||
if (!string.IsNullOrEmpty(DisplayOrder))
|
||||
if (!Enum.TryParse<ItemSortBy>(DisplayOrder, out var sortBy))
|
||||
{
|
||||
sortBy = Enum.Parse<ItemSortBy>(DisplayOrder);
|
||||
sortBy = ItemSortBy.PremiereDate;
|
||||
}
|
||||
|
||||
if (sortBy == ItemSortBy.Default)
|
||||
|
|
Loading…
Reference in New Issue
Block a user