Fix warnings in Sorting
This commit is contained in:
parent
1888e7ac21
commit
078200d8d4
|
@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
public class AiredEpisodeOrderComparer : IBaseItemComparer
|
public class AiredEpisodeOrderComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.AiredEpisodeOrder;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -155,11 +161,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return comparisonResult;
|
return comparisonResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.AiredEpisodeOrder;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AlbumArtistComparer : IBaseItemComparer
|
public class AlbumArtistComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.AlbumArtist;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -34,11 +40,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return audio?.AlbumArtists.FirstOrDefault();
|
return audio?.AlbumArtists.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.AlbumArtist;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class AlbumComparer : IBaseItemComparer
|
public class AlbumComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.Album;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -33,11 +39,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return audio == null ? string.Empty : audio.Album;
|
return audio == null ? string.Empty : audio.Album;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.Album;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CriticRatingComparer : IBaseItemComparer
|
public class CriticRatingComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.CriticRating;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -24,11 +30,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
return x?.CriticRating ?? 0;
|
return x?.CriticRating ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.CriticRating;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class DateCreatedComparer : IBaseItemComparer
|
public class DateCreatedComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.DateCreated;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -30,11 +36,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return DateTime.Compare(x.DateCreated, y.DateCreated);
|
return DateTime.Compare(x.DateCreated, y.DateCreated);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.DateCreated;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// <value>The user data repository.</value>
|
/// <value>The user data repository.</value>
|
||||||
public IUserDataManager UserDataRepository { get; set; }
|
public IUserDataManager UserDataRepository { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.DatePlayed;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -59,11 +65,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return DateTime.MinValue;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.DatePlayed;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class NameComparer : IBaseItemComparer
|
public class NameComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.Name;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -30,11 +36,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return string.Compare(x.Name, y.Name, StringComparison.CurrentCultureIgnoreCase);
|
return string.Compare(x.Name, y.Name, StringComparison.CurrentCultureIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.Name;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,24 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// <value>The user.</value>
|
/// <value>The user.</value>
|
||||||
public User User { get; set; }
|
public User User { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.PlayCount;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the user data repository.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The user data repository.</value>
|
||||||
|
public IUserDataManager UserDataRepository { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the user manager.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The user manager.</value>
|
||||||
|
public IUserManager UserManager { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -41,23 +59,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return userdata == null ? 0 : userdata.PlayCount;
|
return userdata == null ? 0 : userdata.PlayCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.PlayCount;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user data repository.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user data repository.</value>
|
|
||||||
public IUserDataManager UserDataRepository { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the user manager.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The user manager.</value>
|
|
||||||
public IUserManager UserManager { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PremiereDateComparer : IBaseItemComparer
|
public class PremiereDateComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.PremiereDate;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -52,11 +58,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return DateTime.MinValue;
|
return DateTime.MinValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.PremiereDate;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ProductionYearComparer : IBaseItemComparer
|
public class ProductionYearComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.ProductionYear;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -44,11 +50,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.ProductionYear;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RandomComparer : IBaseItemComparer
|
public class RandomComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.Random;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -20,11 +26,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
return Guid.NewGuid().CompareTo(Guid.NewGuid());
|
return Guid.NewGuid().CompareTo(Guid.NewGuid());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.Random;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class RuntimeComparer : IBaseItemComparer
|
public class RuntimeComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.Runtime;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -32,11 +38,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return (x.RunTimeTicks ?? 0).CompareTo(y.RunTimeTicks ?? 0);
|
return (x.RunTimeTicks ?? 0).CompareTo(y.RunTimeTicks ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.Runtime;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SortNameComparer : IBaseItemComparer
|
public class SortNameComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.SortName;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -32,11 +38,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return string.Compare(x.SortName, y.SortName, StringComparison.CurrentCultureIgnoreCase);
|
return string.Compare(x.SortName, y.SortName, StringComparison.CurrentCultureIgnoreCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.SortName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,12 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
{
|
{
|
||||||
public class StudioComparer : IBaseItemComparer
|
public class StudioComparer : IBaseItemComparer
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the name.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>The name.</value>
|
||||||
|
public string Name => ItemSortBy.Studio;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Compares the specified x.
|
/// Compares the specified x.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -33,11 +39,5 @@ namespace Emby.Server.Implementations.Sorting
|
||||||
|
|
||||||
return AlphanumericComparator.CompareValues(x.Studios.FirstOrDefault(), y.Studios.FirstOrDefault());
|
return AlphanumericComparator.CompareValues(x.Studios.FirstOrDefault(), y.Studios.FirstOrDefault());
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets the name.
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The name.</value>
|
|
||||||
public string Name => ItemSortBy.Studio;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user