Force album/artist refresh when folder changes, to cater for cover art files

This commit is contained in:
Deluan 2020-06-27 18:41:55 -04:00
parent 703875b895
commit ab1c943d1f

View File

@ -175,6 +175,17 @@ func (s *TagScanner) processChangedDir(ctx context.Context, dir string, updatedA
filesToUpdate = append(filesToUpdate, filePath)
}
delete(currentTracks, filePath)
// Force a refresh of the album and artist, to cater for cover art files. Ideally we would only do this
// if there are any image file in the folder (TODO)
err = s.updateAlbum(ctx, c.AlbumID, updatedAlbums)
if err != nil {
return err
}
err = s.updateArtist(ctx, c.AlbumArtistID, updatedArtists)
if err != nil {
return err
}
}
numUpdatedTracks := 0