From 2e43a0746c37396946330107bdb158e80bc4f22b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 3 Sep 2013 10:33:40 -0400 Subject: [PATCH] fixes #508 - Add more sort orders to web client album page --- .../Sorting/AlbumArtistComparer.cs | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs b/MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs index 2493c0fc6..583280f0f 100644 --- a/MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs +++ b/MediaBrowser.Server.Implementations/Sorting/AlbumArtistComparer.cs @@ -1,4 +1,5 @@ -using MediaBrowser.Controller.Entities; +using System.Linq; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; @@ -31,7 +32,26 @@ namespace MediaBrowser.Server.Implementations.Sorting { var audio = x as Audio; - return audio == null ? string.Empty : audio.AlbumArtist; + if (audio != null) + { + return audio.AlbumArtist; + } + + var album = x as MusicAlbum; + + if (album != null) + { + var song = album.RecursiveChildren + .OfType