mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 19:12:40 +01:00
Embedart: remove_art_file on import
Should fix #1662. I think the fix is easy. Don't know if it's clean though. Did some tests (+/- 10 albums), all successful. This is the first time I'm using python so please let me know what I should improve:)
This commit is contained in:
parent
16ad174d29
commit
0ed98515ad
1 changed files with 7 additions and 0 deletions
|
|
@ -141,3 +141,10 @@ class EmbedCoverArtPlugin(BeetsPlugin):
|
|||
art.embed_album(self._log, album, max_width, True,
|
||||
self.config['compare_threshold'].get(int),
|
||||
self.config['ifempty'].get(bool))
|
||||
if self.config['remove_art_file'] and album.artpath is not None:
|
||||
if os.path.isfile(album.artpath):
|
||||
self._log.debug(u'Removing album art file '
|
||||
u'for {0}', album)
|
||||
os.remove(album.artpath)
|
||||
album.artpath = None
|
||||
album.store()
|
||||
|
|
|
|||
Loading…
Reference in a new issue