From ac41b6d6e5f432d92d21cdc9802e5caf6e20e61c Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 29 Dec 2016 13:30:17 -0500 Subject: [PATCH 1/2] Fix #2339: scrub resets art type We now use the richer `images` field instead of the more basic `art` field. --- beetsplug/scrub.py | 6 +++--- docs/changelog.rst | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/beetsplug/scrub.py b/beetsplug/scrub.py index 8ecf8ad5d..b652fa2f5 100644 --- a/beetsplug/scrub.py +++ b/beetsplug/scrub.py @@ -123,7 +123,7 @@ class ScrubPlugin(BeetsPlugin): self._log.error(u'could not open file to scrub: {0}', exc) return - art = mf.art + images = mf.images # Remove all tags. self._scrub(item.path) @@ -132,12 +132,12 @@ 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') try: mf = mediafile.MediaFile(util.syspath(item.path), config['id3v23'].get(bool)) - mf.art = art + mf.images = images mf.save() except mediafile.UnreadableFileError as exc: self._log.error(u'could not write tags: {0}', exc) diff --git a/docs/changelog.rst b/docs/changelog.rst index e5e027016..b7095acff 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -25,6 +25,8 @@ Fixes: * :doc:`/plugins/bpd`: Fix a crash on non-ASCII MPD commands. :bug:`2332` * :doc:`/plugins/scrub`: Avoid a crash when files cannot be read or written. :bug:`2351` +* :doc:`/plugins/scrub`: The image type values on scrubbed files are preserved + instead of being reset to "other." :bug:`2339` For plugin developers: new importer prompt choices (see :ref:`append_prompt_choices`), you can now provide new candidates for the user to consider. From 26425448679151bf6b1a7cac10381c6f4983dc8b Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Thu, 29 Dec 2016 13:34:23 -0500 Subject: [PATCH 2/2] Changelog note for #2353 --- docs/changelog.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index b7095acff..2303bfdd2 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -27,6 +27,8 @@ Fixes: :bug:`2351` * :doc:`/plugins/scrub`: The image type values on scrubbed files are preserved instead of being reset to "other." :bug:`2339` +* :doc:`/plugins/web`: Fix a crash on Python 3 when serving files from the + filesystem. :bug:`2353` For plugin developers: new importer prompt choices (see :ref:`append_prompt_choices`), you can now provide new candidates for the user to consider.