Skip to content

Commit 94e9b86

Browse files
committed
Filter plugin tags for disabled plugins from TagVars.names() method
1 parent c8e0f0e commit 94e9b86

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

picard/tags/tagvar.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
except ImportError:
3434
markdown = None
3535

36+
from picard.config import get_config
3637
from picard.i18n import (
3738
N_,
3839
gettext as _,
@@ -338,6 +339,11 @@ def display_full_description(self, tagname):
338339
return self._format_display(name, content, tagdesc)
339340

340341
def names(self, selector=None):
342+
config = get_config()
343+
plugins = config.setting['enabled_plugins'] if 'enabled_plugins' in config.setting else []
344+
341345
for item in self._items:
346+
if item.plugin_id and item.plugin_id not in plugins:
347+
continue
342348
if selector is None or selector(item):
343349
yield str(item)

0 commit comments

Comments
 (0)