Skip to content

Commit 690511d

Browse files
JOJ0Copilot
andcommitted
Update beetsplug/importsource.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ad21001 commit 690511d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

beetsplug/importsource.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ def __init__(self):
2626
}
2727
)
2828
self.import_stages = [self.import_stage]
29+
# In order to stop future removal suggestions for an album we keep
30+
# track of `mb_albumid`s in this set. Always initialize to avoid
31+
# AttributeError when methods access this even if feature disabled.
32+
self.stop_suggestions_for_albums = set()
2933
# Only register removal suggestion listeners if the feature is enabled
3034
if self.config["suggest_removal"]:
31-
# In order to stop future removal suggestions for an album we keep
32-
# track of `mb_albumid`s in this set.
33-
self.stop_suggestions_for_albums = set()
3435
self.register_listener("item_removed", self.suggest_removal)
3536
# During reimports (import --library) both the import_task_choice and
3637
# the item_removed event are triggered. The item_removed event is

0 commit comments

Comments
 (0)