From 395aec96a36a440ab0ca9afc87f76471676bac98 Mon Sep 17 00:00:00 2001 From: wisp3rwind <17089248+wisp3rwind@users.noreply.github.com> Date: Wed, 9 Apr 2025 09:42:36 +0200 Subject: [PATCH] fetchart: fixup #5244 by restoring config validation and making things more Pythonic --- beetsplug/fetchart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/fetchart.py b/beetsplug/fetchart.py index 5451b4dbb..85bed6233 100644 --- a/beetsplug/fetchart.py +++ b/beetsplug/fetchart.py @@ -1295,7 +1295,7 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin): @staticmethod def _is_source_file_removal_enabled(): - return config["import"]["delete"] or config["import"]["move"] + return config["import"]["delete"].get(bool) or config["import"]["move"].get(bool) # Asynchronous; after music is added to the library. def fetch_art(self, session, task): @@ -1339,7 +1339,7 @@ class FetchArtPlugin(plugins.BeetsPlugin, RequestMixin): """Place the discovered art in the filesystem.""" if task in self.art_candidates: candidate = self.art_candidates.pop(task) - removal_enabled = FetchArtPlugin._is_source_file_removal_enabled() + removal_enabled = self._is_source_file_removal_enabled() self._set_art(task.album, candidate, not removal_enabled)