diff options
Diffstat (limited to 'Emby.Server.Implementations/Sorting')
26 files changed, 52 insertions, 26 deletions
diff --git a/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs b/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs index 964004ecc..6d13c6d57 100644 --- a/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs +++ b/Emby.Server.Implementations/Sorting/AiredEpisodeOrderComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs b/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs index 67a9fbd3b..65c8599e7 100644 --- a/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs +++ b/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/AlbumComparer.cs b/Emby.Server.Implementations/Sorting/AlbumComparer.cs index 4bed0fca1..e07113655 100644 --- a/Emby.Server.Implementations/Sorting/AlbumComparer.cs +++ b/Emby.Server.Implementations/Sorting/AlbumComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/ArtistComparer.cs b/Emby.Server.Implementations/Sorting/ArtistComparer.cs index a8bb55e2b..f99977e5c 100644 --- a/Emby.Server.Implementations/Sorting/ArtistComparer.cs +++ b/Emby.Server.Implementations/Sorting/ArtistComparer.cs @@ -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) diff --git a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs index 5cb11ab46..9e02ea2ae 100644 --- a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs b/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs index ba1835e4f..d4a8d4689 100644 --- a/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs b/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs index 6133aaccc..b86b4432f 100644 --- a/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs b/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs index b1cb123ce..e1c26d012 100644 --- a/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DateLastMediaAddedComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs index 453d817c7..d668c17bf 100644 --- a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/IndexNumberComparer.cs b/Emby.Server.Implementations/Sorting/IndexNumberComparer.cs index 1bcaccd8a..11cad6256 100644 --- a/Emby.Server.Implementations/Sorting/IndexNumberComparer.cs +++ b/Emby.Server.Implementations/Sorting/IndexNumberComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs index 73e628cf7..622a341b6 100644 --- a/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/IsFolderComparer.cs b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs index 3c5ddeefa..6f0ca59c5 100644 --- a/Emby.Server.Implementations/Sorting/IsFolderComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs index 7d77a8bc5..2a3e456c2 100644 --- a/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs index 926835f90..afd8ccf9f 100644 --- a/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/NameComparer.cs b/Emby.Server.Implementations/Sorting/NameComparer.cs index 93bec4db9..72d9c7973 100644 --- a/Emby.Server.Implementations/Sorting/NameComparer.cs +++ b/Emby.Server.Implementations/Sorting/NameComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs index ce44f99a6..b4ee2c723 100644 --- a/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/ParentIndexNumberComparer.cs b/Emby.Server.Implementations/Sorting/ParentIndexNumberComparer.cs index c54750843..5aeac29be 100644 --- a/Emby.Server.Implementations/Sorting/ParentIndexNumberComparer.cs +++ b/Emby.Server.Implementations/Sorting/ParentIndexNumberComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs index 16f1b79b3..12f88bf4d 100644 --- a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs index db86b8002..8c8b8824f 100644 --- a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs index 7fd1e024d..9aec87f18 100644 --- a/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs +++ b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/RandomComparer.cs b/Emby.Server.Implementations/Sorting/RandomComparer.cs index bf0168222..6f8ea5b74 100644 --- a/Emby.Server.Implementations/Sorting/RandomComparer.cs +++ b/Emby.Server.Implementations/Sorting/RandomComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/RuntimeComparer.cs b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs index 753e58324..3c096ab02 100644 --- a/Emby.Server.Implementations/Sorting/RuntimeComparer.cs +++ b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs index 5b6c64f63..ed42fd6d5 100644 --- a/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs +++ b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/SortNameComparer.cs b/Emby.Server.Implementations/Sorting/SortNameComparer.cs index 19abafe19..314c25d12 100644 --- a/Emby.Server.Implementations/Sorting/SortNameComparer.cs +++ b/Emby.Server.Implementations/Sorting/SortNameComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/StartDateComparer.cs b/Emby.Server.Implementations/Sorting/StartDateComparer.cs index 2759d20de..e0b438ef1 100644 --- a/Emby.Server.Implementations/Sorting/StartDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/StartDateComparer.cs @@ -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. diff --git a/Emby.Server.Implementations/Sorting/StudioComparer.cs b/Emby.Server.Implementations/Sorting/StudioComparer.cs index 89d10f3d2..0edffb783 100644 --- a/Emby.Server.Implementations/Sorting/StudioComparer.cs +++ b/Emby.Server.Implementations/Sorting/StudioComparer.cs @@ -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. |
