Remove non-album artist_ids from the DB

This commit is contained in:
Deluan 2021-11-05 20:24:41 -04:00
parent 0d9dcebf32
commit 1c82bf5179
5 changed files with 53 additions and 1 deletions

View file

@ -135,6 +135,11 @@ func (s *SQLStore) GC(ctx context.Context, rootFolder string) error {
log.Error(ctx, "Error removing dangling tracks", err)
return err
}
err = s.MediaFile(ctx).(*mediaFileRepository).removeNonAlbumArtistIds()
if err != nil {
log.Error(ctx, "Error removing non-album artist_ids", err)
return err
}
err = s.Album(ctx).(*albumRepository).purgeEmpty()
if err != nil {
log.Error(ctx, "Error removing empty albums", err)