Fix warnings in Sorting

This commit is contained in:
Patrick Barron 2021-10-02 13:23:05 -04:00
parent 1888e7ac21
commit 078200d8d4
14 changed files with 96 additions and 96 deletions

View File

@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
{
public class AiredEpisodeOrderComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.AiredEpisodeOrder;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -155,11 +161,5 @@ namespace Emby.Server.Implementations.Sorting
return comparisonResult;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.AiredEpisodeOrder;
}
}

View File

@ -12,6 +12,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class AlbumArtistComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.AlbumArtist;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -34,11 +40,5 @@ namespace Emby.Server.Implementations.Sorting
return audio?.AlbumArtists.FirstOrDefault();
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.AlbumArtist;
}
}

View File

@ -11,6 +11,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class AlbumComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Album;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -33,11 +39,5 @@ namespace Emby.Server.Implementations.Sorting
return audio == null ? string.Empty : audio.Album;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Album;
}
}

View File

@ -9,6 +9,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class CriticRatingComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.CriticRating;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -24,11 +30,5 @@ namespace Emby.Server.Implementations.Sorting
{
return x?.CriticRating ?? 0;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.CriticRating;
}
}

View File

@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class DateCreatedComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.DateCreated;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -30,11 +36,5 @@ namespace Emby.Server.Implementations.Sorting
return DateTime.Compare(x.DateCreated, y.DateCreated);
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.DateCreated;
}
}

View File

@ -32,6 +32,12 @@ namespace Emby.Server.Implementations.Sorting
/// <value>The user data repository.</value>
public IUserDataManager UserDataRepository { get; set; }
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.DatePlayed;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -59,11 +65,5 @@ namespace Emby.Server.Implementations.Sorting
return DateTime.MinValue;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.DatePlayed;
}
}

View File

@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class NameComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Name;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -30,11 +36,5 @@ namespace Emby.Server.Implementations.Sorting
return string.Compare(x.Name, y.Name, StringComparison.CurrentCultureIgnoreCase);
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Name;
}
}

View File

@ -19,6 +19,24 @@ namespace Emby.Server.Implementations.Sorting
/// <value>The user.</value>
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>
/// Compares the specified x.
/// </summary>
@ -41,23 +59,5 @@ namespace Emby.Server.Implementations.Sorting
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; }
}
}

View File

@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class PremiereDateComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.PremiereDate;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -52,11 +58,5 @@ namespace Emby.Server.Implementations.Sorting
return DateTime.MinValue;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.PremiereDate;
}
}

View File

@ -9,6 +9,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class ProductionYearComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.ProductionYear;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -44,11 +50,5 @@ namespace Emby.Server.Implementations.Sorting
return 0;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.ProductionYear;
}
}

View File

@ -10,6 +10,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class RandomComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Random;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -20,11 +26,5 @@ namespace Emby.Server.Implementations.Sorting
{
return Guid.NewGuid().CompareTo(Guid.NewGuid());
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Random;
}
}

View File

@ -12,6 +12,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class RuntimeComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Runtime;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -32,11 +38,5 @@ namespace Emby.Server.Implementations.Sorting
return (x.RunTimeTicks ?? 0).CompareTo(y.RunTimeTicks ?? 0);
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Runtime;
}
}

View File

@ -12,6 +12,12 @@ namespace Emby.Server.Implementations.Sorting
/// </summary>
public class SortNameComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.SortName;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -32,11 +38,5 @@ namespace Emby.Server.Implementations.Sorting
return string.Compare(x.SortName, y.SortName, StringComparison.CurrentCultureIgnoreCase);
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.SortName;
}
}

View File

@ -13,6 +13,12 @@ namespace Emby.Server.Implementations.Sorting
{
public class StudioComparer : IBaseItemComparer
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Studio;
/// <summary>
/// Compares the specified x.
/// </summary>
@ -33,11 +39,5 @@ namespace Emby.Server.Implementations.Sorting
return AlphanumericComparator.CompareValues(x.Studios.FirstOrDefault(), y.Studios.FirstOrDefault());
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.Studio;
}
}