mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-02 00:12:24 +00:00
Convert ItemSortBy to enum (#9765)
* Convert ItemSortBy to enum * Rename Unknown to Default
This commit is contained in:
@@ -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