From ed0b7a09a217ce804d635bc9eb6d358ceca17cb3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 28 May 2013 21:44:12 -0400 Subject: [PATCH] get music artist genres from albums --- .../Entities/Audio/MusicArtist.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs index b2fc04873..a8de0f08a 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicArtist.cs @@ -1,4 +1,7 @@ - +using System; +using System.Linq; +using System.Collections.Generic; + namespace MediaBrowser.Controller.Entities.Audio { /// @@ -6,5 +9,19 @@ namespace MediaBrowser.Controller.Entities.Audio /// public class MusicArtist : Folder { + public override List Genres + { + get + { + return Children + .SelectMany(i => i.Genres) + .Distinct(StringComparer.OrdinalIgnoreCase) + .ToList(); + } + set + { + base.Genres = value; + } + } } }