mirror of
https://github.com/navidrome/navidrome.git
synced 2025-06-09 11:52:35 +03:00
Force album/artist refresh when folder changes, to cater for cover art files
This commit is contained in:
parent
703875b895
commit
ab1c943d1f
@ -175,6 +175,17 @@ func (s *TagScanner) processChangedDir(ctx context.Context, dir string, updatedA
|
|||||||
filesToUpdate = append(filesToUpdate, filePath)
|
filesToUpdate = append(filesToUpdate, filePath)
|
||||||
}
|
}
|
||||||
delete(currentTracks, 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
|
numUpdatedTracks := 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user