From 92e84a2b455d132527ee41eb3364f98a715f5019 Mon Sep 17 00:00:00 2001 From: J0J0 Todos Date: Tue, 21 Jan 2025 18:06:11 +0100 Subject: [PATCH] Make sure existing genres are ALWAYS looked at first thing. Only if genres are existing and force is disabled we return early! --- beetsplug/lastgenre/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beetsplug/lastgenre/__init__.py b/beetsplug/lastgenre/__init__.py index 6f47e5e60..ea9d6697a 100644 --- a/beetsplug/lastgenre/__init__.py +++ b/beetsplug/lastgenre/__init__.py @@ -340,14 +340,14 @@ class LastGenrePlugin(plugins.BeetsPlugin): """ keep_genres = [] - if not self.config["force"]: + genres = self._get_existing_genres(obj) + if genres and not self.config["force"]: # Without force pre-populated tags are returned as-is. if isinstance(obj, library.Item): return obj.get("genre", with_album=False), "keep any, no-force" return obj.get("genre"), "keep any, no-force" if self.config["force"]: - genres = self._get_existing_genres(obj) # Force doesn't keep any unless keep_existing is set. # Whitelist validation is handled in _resolve_genres. if self.config["keep_existing"]: