-
Improvement
-
Resolution: Fixed
-
Normal
-
0.15
-
None
From http://bugs.musicbrainz.org/ticket/5977
Adds execution priorities to plugins (only for album and track metadata processors). Plugins may specify a priority with "PLUGIN_PRIORITY" or a default value of 100 is used. Priorities can be changed on the plugins page and are saved and loaded, also for disabled plugins. The plugin with the lowest value has the highest priority.
Attached is a diff made with the help of tortoisesvn, I don't know if this diff is ok so the attached archive contains all the changed files as well (hope I didn't forgot some).
and..
Just found a small bug, if more plugins have the same priority only one is executed. This should fix it. picard\metadata.py
picard/metadata.py
def run_album_metadata_processors(tagger, metadata, release): dict = {} i = 0 for processor, priority in _album_metadata_processors: i += 1 dict[priority * 10000 + i] = processor for prio in sorted(dict.iterkeys()): dict[prio](tagger, metadata, release) def run_track_metadata_processors(tagger, metadata, release, track): dict = {} i = 0 for processor, priority in _track_metadata_processors: i += 1 dict[priority * 10000 + i] = processor for prio in sorted(dict.iterkeys()): dict[prio](tagger, metadata, track, release)
picard\ui\options\plugins.py
def plugin_priority_up(self): for item in self.ui.plugins.selectedItems(): plugin = self.items[item] if plugin.priority > 1: plugin.priority -= 1 item.setText(0, str(plugin.priority)) def plugin_priority_down(self): for item in self.ui.plugins.selectedItems(): plugin = self.items[item] if plugin.priority < 1000: plugin.priority += 1 item.setText(0, str(plugin.priority))
- is related to
-
PICARD-36 Make feat artists plugins work better alongside title case plugin
- Closed