mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
scrub: no need to save after delete()
The delete() method on Mutagen objects writes the file directly. Calling save() was unnecessary and, in at least one case we found, could inadvertently preserve non-standard tags that Mutagen did not understand.
This commit is contained in:
parent
c0c01b2680
commit
d6dac1d35b
2 changed files with 3 additions and 1 deletions
|
|
@ -127,12 +127,12 @@ def _scrub(path):
|
||||||
# remove them. In this case, we just remove all the tags.
|
# remove them. In this case, we just remove all the tags.
|
||||||
for tag in f.keys():
|
for tag in f.keys():
|
||||||
del f[tag]
|
del f[tag]
|
||||||
|
f.save()
|
||||||
except IOError as exc:
|
except IOError as exc:
|
||||||
log.error(u'could not scrub {0}: {1}'.format(
|
log.error(u'could not scrub {0}: {1}'.format(
|
||||||
util.displayable_path(path),
|
util.displayable_path(path),
|
||||||
exc,
|
exc,
|
||||||
))
|
))
|
||||||
f.save()
|
|
||||||
|
|
||||||
|
|
||||||
# Automatically embed art into imported albums.
|
# Automatically embed art into imported albums.
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ And some fixes:
|
||||||
Thanks to Pedro Silva.
|
Thanks to Pedro Silva.
|
||||||
* Fix an occasional KeyError in the :ref:`update-cmd` command introduced in
|
* Fix an occasional KeyError in the :ref:`update-cmd` command introduced in
|
||||||
1.3.0.
|
1.3.0.
|
||||||
|
* :doc:`/plugins/scrub`: Avoid preserving certain non-standard ID3 tags such
|
||||||
|
as NCON.
|
||||||
|
|
||||||
.. _Opus: http://www.opus-codec.org/
|
.. _Opus: http://www.opus-codec.org/
|
||||||
.. _@Verrus: https://github.com/Verrus
|
.. _@Verrus: https://github.com/Verrus
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue