aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-22 23:56:11 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-04-22 23:56:11 -0400
commit4a100452cf98228a766375dbf009209f719e8ae3 (patch)
tree650f76f96ab5f3cd2fc0919a4636af48c6a7192c /MediaBrowser.Server.Implementations
parent9553542875d45ac17087e55e0e80d094622ce895 (diff)
audio page progress
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/Library/LibraryManager.cs6
-rw-r--r--MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs7
2 files changed, 11 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
index 692176efc..315abd49d 100644
--- a/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
+++ b/MediaBrowser.Server.Implementations/Library/LibraryManager.cs
@@ -788,12 +788,16 @@ namespace MediaBrowser.Server.Implementations.Library
.OfType<Audio>()
.SelectMany(c =>
{
- var list = c.Artists.ToList();
+ var list = new List<string>();
if (!string.IsNullOrEmpty(c.AlbumArtist))
{
list.Add(c.AlbumArtist);
}
+ if (!string.IsNullOrEmpty(c.Artist))
+ {
+ list.Add(c.Artist);
+ }
return list;
})
diff --git a/MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs b/MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs
index d31ee8790..b0a6989e9 100644
--- a/MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs
+++ b/MediaBrowser.Server.Implementations/Sorting/ArtistComparer.cs
@@ -32,7 +32,12 @@ namespace MediaBrowser.Server.Implementations.Sorting
{
var audio = x as Audio;
- return audio == null ? string.Empty : audio.Artists.OrderBy(i => i).FirstOrDefault() ?? string.Empty;
+ if (audio == null)
+ {
+ return string.Empty;
+ }
+
+ return audio.Artist ?? string.Empty;
}
/// <summary>