mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Merge pull request #7492 from crobibero/sort-by
This commit is contained in:
commit
d80c4ee381
1 changed files with 64 additions and 3 deletions
|
@ -3029,7 +3029,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
if (string.Equals(name, ItemSortBy.PlayCount, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(name, ItemSortBy.PlayCount, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return "PlayCount";
|
return ItemSortBy.PlayCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(name, ItemSortBy.IsFavoriteOrLiked, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(name, ItemSortBy.IsFavoriteOrLiked, StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -3039,7 +3039,7 @@ namespace Emby.Server.Implementations.Data
|
||||||
|
|
||||||
if (string.Equals(name, ItemSortBy.IsFolder, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(name, ItemSortBy.IsFolder, StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
return "IsFolder";
|
return ItemSortBy.IsFolder;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string.Equals(name, ItemSortBy.IsPlayed, StringComparison.OrdinalIgnoreCase))
|
if (string.Equals(name, ItemSortBy.IsPlayed, StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -3087,7 +3087,68 @@ namespace Emby.Server.Implementations.Data
|
||||||
return "SeriesName";
|
return "SeriesName";
|
||||||
}
|
}
|
||||||
|
|
||||||
return name;
|
if (string.Equals(name, ItemSortBy.AiredEpisodeOrder, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.AiredEpisodeOrder;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.Album, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.Album;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.DateCreated, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.DateCreated;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.PremiereDate, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.PremiereDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.StartDate, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.StartDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.Name, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.CommunityRating, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.CommunityRating;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.ProductionYear, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.ProductionYear;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.CriticRating, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.CriticRating;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.VideoBitRate, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.VideoBitRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.ParentIndexNumber, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.ParentIndexNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (string.Equals(name, ItemSortBy.IndexNumber, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
return ItemSortBy.IndexNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Unknown SortBy, just sort by the SortName.
|
||||||
|
return ItemSortBy.SortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Guid> GetItemIdsList(InternalItemsQuery query)
|
public List<Guid> GetItemIdsList(InternalItemsQuery query)
|
||||||
|
|
Loading…
Reference in a new issue