Skip to content

Commit

Permalink
move_art: Remove missing album art
Browse files Browse the repository at this point in the history
Prevents a fatal file system error if the album art has been moved or renamed
and the beets library hasn't been manually updated.
  • Loading branch information
projectgus committed Sep 9, 2018
1 parent 3ddf3ef commit 0b3444e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions beets/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,12 @@ def move_art(self, operation=MoveOperation.MOVE):
if not old_art:
return

if not os.path.exists(old_art):
log.error(u'album art {0} not found, removing',
util.displayable_path(old_art))
self.artpath = None
return

new_art = self.art_destination(old_art)
if new_art == old_art:
return
Expand Down

0 comments on commit 0b3444e

Please sign in to comment.