mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-17 19:54:47 +01:00
fixes #520 - Support multiple artists per audio track
This commit is contained in:
@@ -900,10 +900,7 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
{
|
||||
list.Add(c.AlbumArtist);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(c.Artist))
|
||||
{
|
||||
list.Add(c.Artist);
|
||||
}
|
||||
list.AddRange(c.Artists);
|
||||
|
||||
return list;
|
||||
})
|
||||
|
||||
@@ -120,8 +120,18 @@ namespace MediaBrowser.Server.Implementations.Library
|
||||
|
||||
// Find artists
|
||||
var artists = items.OfType<Audio>()
|
||||
.SelectMany(i => new[] { i.Artist, i.AlbumArtist })
|
||||
.Where(i => !string.IsNullOrEmpty(i))
|
||||
.SelectMany(i =>
|
||||
{
|
||||
var list = new List<string>();
|
||||
|
||||
if (!string.IsNullOrEmpty(i.AlbumArtist))
|
||||
{
|
||||
list.Add(i.AlbumArtist);
|
||||
}
|
||||
list.AddRange(i.Artists);
|
||||
|
||||
return list;
|
||||
})
|
||||
.Distinct(StringComparer.OrdinalIgnoreCase)
|
||||
.ToList();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user