mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-21 08:15:28 +03:00
Convert ItemSortBy to enum (#9765)
* Convert ItemSortBy to enum * Rename Unknown to Default
This commit is contained in:
@@ -219,7 +219,7 @@ public class TvShowsController : BaseJellyfinApiController
|
||||
[FromQuery] int? imageTypeLimit,
|
||||
[FromQuery, ModelBinder(typeof(CommaDelimitedArrayModelBinder))] ImageType[] enableImageTypes,
|
||||
[FromQuery] bool? enableUserData,
|
||||
[FromQuery] string? sortBy)
|
||||
[FromQuery] ItemSortBy? sortBy)
|
||||
{
|
||||
userId = RequestHelpers.GetUserId(User, userId);
|
||||
var user = userId.Value.Equals(default)
|
||||
@@ -289,7 +289,7 @@ public class TvShowsController : BaseJellyfinApiController
|
||||
episodes = UserViewBuilder.FilterForAdjacency(episodes, adjacentTo.Value).ToList();
|
||||
}
|
||||
|
||||
if (string.Equals(sortBy, ItemSortBy.Random, StringComparison.OrdinalIgnoreCase))
|
||||
if (sortBy == ItemSortBy.Random)
|
||||
{
|
||||
episodes.Shuffle();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user