mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-15 23:02:18 +01:00
Convert ItemSortBy to enum (#9765)
* Convert ItemSortBy to enum * Rename Unknown to Default
This commit is contained in:
@@ -2042,7 +2042,7 @@ namespace Emby.Server.Implementations.Data
|
||||
return false;
|
||||
}
|
||||
|
||||
var sortingFields = new HashSet<string>(query.OrderBy.Select(i => i.OrderBy), StringComparer.OrdinalIgnoreCase);
|
||||
var sortingFields = new HashSet<ItemSortBy>(query.OrderBy.Select(i => i.OrderBy));
|
||||
|
||||
return sortingFields.Contains(ItemSortBy.IsFavoriteOrLiked)
|
||||
|| sortingFields.Contains(ItemSortBy.IsPlayed)
|
||||
@@ -2832,20 +2832,20 @@ namespace Emby.Server.Implementations.Data
|
||||
|
||||
if (hasSimilar || hasSearch)
|
||||
{
|
||||
List<(string, SortOrder)> prepend = new List<(string, SortOrder)>(4);
|
||||
List<(ItemSortBy, SortOrder)> prepend = new List<(ItemSortBy, SortOrder)>(4);
|
||||
if (hasSearch)
|
||||
{
|
||||
prepend.Add(("SearchScore", SortOrder.Descending));
|
||||
prepend.Add((ItemSortBy.SearchScore, SortOrder.Descending));
|
||||
prepend.Add((ItemSortBy.SortName, SortOrder.Ascending));
|
||||
}
|
||||
|
||||
if (hasSimilar)
|
||||
{
|
||||
prepend.Add(("SimilarityScore", SortOrder.Descending));
|
||||
prepend.Add((ItemSortBy.SimilarityScore, SortOrder.Descending));
|
||||
prepend.Add((ItemSortBy.Random, SortOrder.Ascending));
|
||||
}
|
||||
|
||||
var arr = new (string, SortOrder)[prepend.Count + orderBy.Count];
|
||||
var arr = new (ItemSortBy, SortOrder)[prepend.Count + orderBy.Count];
|
||||
prepend.CopyTo(arr, 0);
|
||||
orderBy.CopyTo(arr, prepend.Count);
|
||||
orderBy = query.OrderBy = arr;
|
||||
@@ -2863,166 +2863,43 @@ namespace Emby.Server.Implementations.Data
|
||||
}));
|
||||
}
|
||||
|
||||
private string MapOrderByField(string name, InternalItemsQuery query)
|
||||
private string MapOrderByField(ItemSortBy sortBy, InternalItemsQuery query)
|
||||
{
|
||||
if (string.Equals(name, ItemSortBy.AirTime, StringComparison.OrdinalIgnoreCase))
|
||||
return sortBy switch
|
||||
{
|
||||
// TODO
|
||||
return "SortName";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.Runtime, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "RuntimeTicks";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.Random, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "RANDOM()";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.DatePlayed, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (query.GroupBySeriesPresentationUniqueKey)
|
||||
{
|
||||
return "MAX(LastPlayedDate)";
|
||||
}
|
||||
|
||||
return "LastPlayedDate";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.PlayCount, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ItemSortBy.PlayCount;
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.IsFavoriteOrLiked, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "(Select Case When IsFavorite is null Then 0 Else IsFavorite End )";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.IsFolder, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ItemSortBy.IsFolder;
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.IsPlayed, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "played";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.IsUnplayed, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "played";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.DateLastContentAdded, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "DateLastMediaAdded";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.Artist, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "(select CleanValue from ItemValues where ItemId=Guid and Type=0 LIMIT 1)";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.AlbumArtist, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "(select CleanValue from ItemValues where ItemId=Guid and Type=1 LIMIT 1)";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.OfficialRating, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "InheritedParentalRatingValue";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.Studio, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "(select CleanValue from ItemValues where ItemId=Guid and Type=3 LIMIT 1)";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.SeriesDatePlayed, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "(Select MAX(LastPlayedDate) from TypedBaseItems B" + GetJoinUserDataText(query) + " where Played=1 and B.SeriesPresentationUniqueKey=A.PresentationUniqueKey)";
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.SeriesSortName, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return "SeriesName";
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.SimilarityScore, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ItemSortBy.SimilarityScore;
|
||||
}
|
||||
|
||||
if (string.Equals(name, ItemSortBy.SearchScore, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return ItemSortBy.SearchScore;
|
||||
}
|
||||
|
||||
// Unknown SortBy, just sort by the SortName.
|
||||
return ItemSortBy.SortName;
|
||||
ItemSortBy.AirTime => "SortName", // TODO
|
||||
ItemSortBy.Runtime => "RuntimeTicks",
|
||||
ItemSortBy.Random => "RANDOM()",
|
||||
ItemSortBy.DatePlayed when query.GroupBySeriesPresentationUniqueKey => "MAX(LastPlayedDate)",
|
||||
ItemSortBy.DatePlayed => "LastPlayedDate",
|
||||
ItemSortBy.PlayCount => "PlayCount",
|
||||
ItemSortBy.IsFavoriteOrLiked => "(Select Case When IsFavorite is null Then 0 Else IsFavorite End )",
|
||||
ItemSortBy.IsFolder => "IsFolder",
|
||||
ItemSortBy.IsPlayed => "played",
|
||||
ItemSortBy.IsUnplayed => "played",
|
||||
ItemSortBy.DateLastContentAdded => "DateLastMediaAdded",
|
||||
ItemSortBy.Artist => "(select CleanValue from ItemValues where ItemId=Guid and Type=0 LIMIT 1)",
|
||||
ItemSortBy.AlbumArtist => "(select CleanValue from ItemValues where ItemId=Guid and Type=1 LIMIT 1)",
|
||||
ItemSortBy.OfficialRating => "InheritedParentalRatingValue",
|
||||
ItemSortBy.Studio => "(select CleanValue from ItemValues where ItemId=Guid and Type=3 LIMIT 1)",
|
||||
ItemSortBy.SeriesDatePlayed => "(Select MAX(LastPlayedDate) from TypedBaseItems B" + GetJoinUserDataText(query) + " where Played=1 and B.SeriesPresentationUniqueKey=A.PresentationUniqueKey)",
|
||||
ItemSortBy.SeriesSortName => "SeriesName",
|
||||
ItemSortBy.AiredEpisodeOrder => "AiredEpisodeOrder",
|
||||
ItemSortBy.Album => "Album",
|
||||
ItemSortBy.DateCreated => "DateCreated",
|
||||
ItemSortBy.PremiereDate => "PremiereDate",
|
||||
ItemSortBy.StartDate => "StartDate",
|
||||
ItemSortBy.Name => "Name",
|
||||
ItemSortBy.CommunityRating => "CommunityRating",
|
||||
ItemSortBy.ProductionYear => "ProductionYear",
|
||||
ItemSortBy.CriticRating => "CriticRating",
|
||||
ItemSortBy.VideoBitRate => "VideoBitRate",
|
||||
ItemSortBy.ParentIndexNumber => "ParentIndexNumber",
|
||||
ItemSortBy.IndexNumber => "IndexNumber",
|
||||
ItemSortBy.SimilarityScore => "SimilarityScore",
|
||||
ItemSortBy.SearchScore => "SearchScore",
|
||||
_ => "SortName"
|
||||
};
|
||||
}
|
||||
|
||||
public List<Guid> GetItemIdsList(InternalItemsQuery query)
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Emby.Server.Implementations.Images
|
||||
Recursive = true,
|
||||
DtoOptions = new DtoOptions(true),
|
||||
ImageTypes = new ImageType[] { ImageType.Primary },
|
||||
OrderBy = new (string, SortOrder)[]
|
||||
OrderBy = new (ItemSortBy, SortOrder)[]
|
||||
{
|
||||
(ItemSortBy.IsFolder, SortOrder.Ascending),
|
||||
(ItemSortBy.SortName, SortOrder.Ascending)
|
||||
|
||||
@@ -1678,7 +1678,7 @@ namespace Emby.Server.Implementations.Library
|
||||
/// <param name="sortBy">The sort by.</param>
|
||||
/// <param name="sortOrder">The sort order.</param>
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
public IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<string> sortBy, SortOrder sortOrder)
|
||||
public IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<ItemSortBy> sortBy, SortOrder sortOrder)
|
||||
{
|
||||
var isFirst = true;
|
||||
|
||||
@@ -1701,7 +1701,7 @@ namespace Emby.Server.Implementations.Library
|
||||
return orderedItems ?? items;
|
||||
}
|
||||
|
||||
public IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<(string OrderBy, SortOrder SortOrder)> orderBy)
|
||||
public IEnumerable<BaseItem> Sort(IEnumerable<BaseItem> items, User user, IEnumerable<(ItemSortBy OrderBy, SortOrder SortOrder)> orderBy)
|
||||
{
|
||||
var isFirst = true;
|
||||
|
||||
@@ -1736,9 +1736,9 @@ namespace Emby.Server.Implementations.Library
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns>IBaseItemComparer.</returns>
|
||||
private IBaseItemComparer GetComparer(string name, User user)
|
||||
private IBaseItemComparer GetComparer(ItemSortBy name, User user)
|
||||
{
|
||||
var comparer = Comparers.FirstOrDefault(c => string.Equals(name, c.Name, StringComparison.OrdinalIgnoreCase));
|
||||
var comparer = Comparers.FirstOrDefault(c => name == c.Type);
|
||||
|
||||
// If it requires a user, create a new one, and assign the user
|
||||
if (comparer is IUserBaseItemComparer)
|
||||
|
||||
@@ -207,7 +207,7 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
orderBy.Insert(0, (ItemSortBy.IsFavoriteOrLiked, SortOrder.Descending));
|
||||
}
|
||||
|
||||
if (!internalQuery.OrderBy.Any(i => string.Equals(i.OrderBy, ItemSortBy.SortName, StringComparison.OrdinalIgnoreCase)))
|
||||
if (internalQuery.OrderBy.All(i => i.OrderBy != ItemSortBy.SortName))
|
||||
{
|
||||
orderBy.Add((ItemSortBy.SortName, SortOrder.Ascending));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.TV;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.AiredEpisodeOrder;
|
||||
public ItemSortBy Type => ItemSortBy.AiredEpisodeOrder;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -16,7 +17,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.AlbumArtist;
|
||||
public ItemSortBy Type => ItemSortBy.AlbumArtist;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -15,7 +16,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.Album;
|
||||
public ItemSortBy Type => ItemSortBy.Album;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Entities.Audio;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -12,7 +13,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
public class ArtistComparer : IBaseItemComparer
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public string Name => ItemSortBy.Artist;
|
||||
public ItemSortBy Type => ItemSortBy.Artist;
|
||||
|
||||
/// <inheritdoc />
|
||||
public int Compare(BaseItem? x, BaseItem? y)
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -13,7 +14,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.CommunityRating;
|
||||
public ItemSortBy Type => ItemSortBy.CommunityRating;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -13,7 +14,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.CriticRating;
|
||||
public ItemSortBy Type => ItemSortBy.CriticRating;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.DateCreated;
|
||||
public ItemSortBy Type => ItemSortBy.DateCreated;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -34,7 +35,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.DateLastContentAdded;
|
||||
public ItemSortBy Type => ItemSortBy.DateLastContentAdded;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -36,7 +37,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.DatePlayed;
|
||||
public ItemSortBy Type => ItemSortBy.DatePlayed;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.IndexNumber;
|
||||
public ItemSortBy Type => ItemSortBy.IndexNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -21,7 +22,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.IsFavoriteOrLiked;
|
||||
public ItemSortBy Type => ItemSortBy.IsFavoriteOrLiked;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data repository.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -12,7 +13,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.IsFolder;
|
||||
public ItemSortBy Type => ItemSortBy.IsFolder;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -22,7 +23,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.IsUnplayed;
|
||||
public ItemSortBy Type => ItemSortBy.IsUnplayed;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data repository.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -22,7 +23,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.IsUnplayed;
|
||||
public ItemSortBy Type => ItemSortBy.IsUnplayed;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data repository.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.Name;
|
||||
public ItemSortBy Type => ItemSortBy.Name;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
@@ -21,7 +22,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.OfficialRating;
|
||||
public ItemSortBy Type => ItemSortBy.OfficialRating;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.ParentIndexNumber;
|
||||
public ItemSortBy Type => ItemSortBy.ParentIndexNumber;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#nullable disable
|
||||
|
||||
using Jellyfin.Data.Entities;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -23,7 +24,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.PlayCount;
|
||||
public ItemSortBy Type => ItemSortBy.PlayCount;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data repository.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.PremiereDate;
|
||||
public ItemSortBy Type => ItemSortBy.PremiereDate;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -13,7 +14,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.ProductionYear;
|
||||
public ItemSortBy Type => ItemSortBy.ProductionYear;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.Random;
|
||||
public ItemSortBy Type => ItemSortBy.Random;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.Runtime;
|
||||
public ItemSortBy Type => ItemSortBy.Runtime;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -13,7 +14,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.SeriesSortName;
|
||||
public ItemSortBy Type => ItemSortBy.SeriesSortName;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Querying;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.SortName;
|
||||
public ItemSortBy Type => ItemSortBy.SortName;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.LiveTv;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.StartDate;
|
||||
public ItemSortBy Type => ItemSortBy.StartDate;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Extensions;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
@@ -14,7 +15,7 @@ namespace Emby.Server.Implementations.Sorting
|
||||
/// Gets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name => ItemSortBy.Studio;
|
||||
public ItemSortBy Type => ItemSortBy.Studio;
|
||||
|
||||
/// <summary>
|
||||
/// Compares the specified x.
|
||||
|
||||
Reference in New Issue
Block a user