mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	get music artist genres from albums
This commit is contained in:
		
							parent
							
								
									c60bd7d58e
								
							
						
					
					
						commit
						ed0b7a09a2
					
				@ -1,4 +1,7 @@
 | 
				
			|||||||
 | 
					using System;
 | 
				
			||||||
 | 
					using System.Linq;
 | 
				
			||||||
 | 
					using System.Collections.Generic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
namespace MediaBrowser.Controller.Entities.Audio
 | 
					namespace MediaBrowser.Controller.Entities.Audio
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /// <summary>
 | 
					    /// <summary>
 | 
				
			||||||
@ -6,5 +9,19 @@ namespace MediaBrowser.Controller.Entities.Audio
 | 
				
			|||||||
    /// </summary>
 | 
					    /// </summary>
 | 
				
			||||||
    public class MusicArtist : Folder
 | 
					    public class MusicArtist : Folder
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
 | 
					        public override List<string> Genres
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					            get
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                return Children
 | 
				
			||||||
 | 
					                .SelectMany(i => i.Genres)
 | 
				
			||||||
 | 
					                .Distinct(StringComparer.OrdinalIgnoreCase)
 | 
				
			||||||
 | 
					                .ToList();
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            set
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                base.Genres = value;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user