mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
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;
|
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 (!Enum.TryParse<ItemSortBy>(DisplayOrder, out var sortBy))
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(DisplayOrder))
|
|
||||||
{
|
{
|
||||||
sortBy = Enum.Parse<ItemSortBy>(DisplayOrder);
|
sortBy = ItemSortBy.PremiereDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sortBy == ItemSortBy.Default)
|
if (sortBy == ItemSortBy.Default)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user