use _dirty.discard, not _dirty.remove

In the case where the field has not actually changed, don't throw a KeyError;
just proceed silently.
This commit is contained in:
Adrian Sampson 2013-10-06 10:03:24 -07:00
parent 2e2e0b2919
commit 6d07b7e4b5
2 changed files with 5 additions and 1 deletions

View file

@ -920,7 +920,7 @@ def update_items(lib, query, album, move, pretend):
old_data['albumartist'] == old_data['artist'] == \
item.artist:
item.albumartist = old_data['albumartist']
item._dirty.remove('albumartist')
item._dirty.discard('albumartist')
# Get and save metadata changes.
changes = {}

View file

@ -47,6 +47,10 @@ And some fixes:
"image.jpg not found during copy" error. Now clutter is removed (and
directories pruned) much later in the process, after the
``import_task_files`` hook.
* :doc:`/plugins/missing`: Fix an error when printing missing track names.
Thanks to Pedro Silva.
* Fix an occasional KeyError in the :ref:`update-cmd` command introduced in
1.3.0.
.. _Opus: http://www.opus-codec.org/
.. _@Verrus: https://github.com/Verrus