From df84a2bdc38f6b567c7e1bcb34d33bd54506460e Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 6 Apr 2014 22:51:52 -0400 Subject: [PATCH] fix music videos missing from artists page --- MediaBrowser.Api/UserLibrary/ArtistsService.cs | 1 + .../Entities/Audio/MusicAlbum.cs | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/MediaBrowser.Api/UserLibrary/ArtistsService.cs b/MediaBrowser.Api/UserLibrary/ArtistsService.cs index 5ca0d75ac..8b1c5ba88 100644 --- a/MediaBrowser.Api/UserLibrary/ArtistsService.cs +++ b/MediaBrowser.Api/UserLibrary/ArtistsService.cs @@ -111,6 +111,7 @@ namespace MediaBrowser.Api.UserLibrary { return items .OfType() + .Where(i => !(i is MusicAlbum)) .SelectMany(i => i.AllArtists) .Distinct(StringComparer.OrdinalIgnoreCase) .Select(name => diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index bc260c696..cce241542 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -31,6 +31,23 @@ namespace MediaBrowser.Controller.Entities.Audio } } + [IgnoreDataMember] + public List AllArtists + { + get + { + var list = new List(); + + if (!string.IsNullOrEmpty(AlbumArtist)) + { + list.Add(AlbumArtist); + } + list.AddRange(Artists); + + return list; + } + } + /// /// Gets or sets the tags. ///