Skip to content

Commit

Permalink
fix(scanner): make sure we have an album artist before populating track
Browse files Browse the repository at this point in the history
if we return early before i == 0 we mightn't have one

fixes #209
  • Loading branch information
sentriz committed Apr 2, 2022
1 parent a8e50c4 commit 01747c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/scanner/scanner.go
Expand Up @@ -219,7 +219,7 @@ func (s *Scanner) populateTrackAndAlbumArtists(tx *db.DB, c *Context, i int, par
}

// metadata for the album table comes only from the the first track's tags
if i == 0 {
if i == 0 || album.TagArtist == nil {
albumArtist, err := populateAlbumArtist(tx, album, parent, trags.SomeAlbumArtist())
if err != nil {
return fmt.Errorf("populate album artist: %w", err)
Expand Down

0 comments on commit 01747c8

Please sign in to comment.