aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Sorting
diff options
context:
space:
mode:
authorredSpoutnik <15638041+redSpoutnik@users.noreply.github.com>2019-03-16 17:54:57 +0100
committerGitHub <noreply@github.com>2019-03-16 17:54:57 +0100
commit480a6607e2badad925216e715841cce6300ef98e (patch)
tree01e09eb894f973f4519342dc6df502e3f1f2799f /Emby.Server.Implementations/Sorting
parent4a30fee40df69be381c2cdea01cd4dd29b97ad3c (diff)
parent3d1d27230de88cbf5c3ed3f882399175661c1c94 (diff)
Merge branch 'master' into subtitle-display-title
Diffstat (limited to 'Emby.Server.Implementations/Sorting')
-rw-r--r--Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs2
-rw-r--r--Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs14
2 files changed, 8 insertions, 8 deletions
diff --git a/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs b/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs
index 535f123f9..0804b01fc 100644
--- a/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs
+++ b/Emby.Server.Implementations/Sorting/AlbumArtistComparer.cs
@@ -32,7 +32,7 @@ namespace Emby.Server.Implementations.Sorting
{
var audio = x as IHasAlbumArtist;
- return audio != null ? audio.AlbumArtists.FirstOrDefault() : null;
+ return audio?.AlbumArtists.FirstOrDefault();
}
/// <summary>
diff --git a/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs
index 46e0dd918..504b6d283 100644
--- a/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs
+++ b/Emby.Server.Implementations/Sorting/SeriesSortNameComparer.cs
@@ -18,17 +18,17 @@ namespace Emby.Server.Implementations.Sorting
return string.Compare(GetValue(x), GetValue(y), StringComparison.CurrentCultureIgnoreCase);
}
- private static string GetValue(BaseItem item)
- {
- var hasSeries = item as IHasSeries;
-
- return hasSeries != null ? hasSeries.FindSeriesSortName() : null;
- }
-
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name => ItemSortBy.SeriesSortName;
+
+ private static string GetValue(BaseItem item)
+ {
+ var hasSeries = item as IHasSeries;
+
+ return hasSeries?.FindSeriesSortName();
+ }
}
}