Skip to content

Commit

Permalink
(#60) Use albumartist if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Difegue committed Sep 16, 2023
1 parent c5099cd commit b01cb98
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/Stylophone.Common/ViewModels/Items/AlbumViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ public async Task LoadAlbumDataAsync(MpcConnection c)
if (Files.Count == 0)
Files.AddRange(findReq.Response.Content);

Artist = Files.Select(f => f.Artist).Distinct().Where(f => f != "").Aggregate((f1, f2) => $"{f1}, {f2}");
Artist = Files.Any(f => f.HasAlbumArtist) ? Files.First(f => f.HasAlbumArtist).AlbumArtist :
Files.Select(f => f.Artist).Distinct().Where(f => f != "").Aggregate((f1, f2) => $"{f1}, {f2}");

// If we've already generated album art, don't use the queue and directly grab it
if (await _albumArtService.IsAlbumArtCachedAsync(Files[0]))
Expand Down

0 comments on commit b01cb98

Please sign in to comment.