Update beets to 1.4.7

Also updates:
- colorama-0.4.1
- jellyfish-0.6.1
- munkres-1.0.12
- musicbrainzngs-0.6
- mutagen-1.41.1
- pyyaml-3.13
- six-1.12.0
- unidecode-1.0.23
This commit is contained in:
Labrys of Knossos 2018-12-15 00:52:11 -05:00
commit e854005ae1
193 changed files with 15896 additions and 6384 deletions

View file

@ -24,6 +24,7 @@ from beets import ui
from beets import util
from beets import config
from beets import mediafile
import mutagen
_MUTAGEN_FORMATS = {
'asf': 'ASF',
@ -106,7 +107,7 @@ class ScrubPlugin(BeetsPlugin):
for tag in f.keys():
del f[tag]
f.save()
except IOError as exc:
except (IOError, mutagen.MutagenError) as exc:
self._log.error(u'could not scrub {0}: {1}',
util.displayable_path(path), exc)
@ -119,10 +120,11 @@ class ScrubPlugin(BeetsPlugin):
try:
mf = mediafile.MediaFile(util.syspath(item.path),
config['id3v23'].get(bool))
except IOError as exc:
except mediafile.UnreadableFileError as exc:
self._log.error(u'could not open file to scrub: {0}',
exc)
art = mf.art
return
images = mf.images
# Remove all tags.
self._scrub(item.path)
@ -131,12 +133,15 @@ class ScrubPlugin(BeetsPlugin):
if restore:
self._log.debug(u'writing new tags after scrub')
item.try_write()
if art:
if images:
self._log.debug(u'restoring art')
mf = mediafile.MediaFile(util.syspath(item.path),
config['id3v23'].get(bool))
mf.art = art
mf.save()
try:
mf = mediafile.MediaFile(util.syspath(item.path),
config['id3v23'].get(bool))
mf.images = images
mf.save()
except mediafile.UnreadableFileError as exc:
self._log.error(u'could not write tags: {0}', exc)
def import_task_files(self, session, task):
"""Automatically scrub imported files."""