-
-
Notifications
You must be signed in to change notification settings - Fork 419
PICARD-3121: Allow user to set metadata processor plugin execution order #2703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
In the discussion on the ticket, it was suggested to also have a EDIT: I could reproduce the original ordering for currently registered (enabled) plugins because the registration priority information is available. This information is not available for installed but currently disabled plugins. For the new v3 plugin system, this could be done for all plugins if the default priority was stored in the plugin's metadata as suggested in the ticket discussion. |
Yes, it's possible for the same plugin to register with both the album metadata processor and the track metadata processor, or even register multiple different methods for each, with different priorities. I thought that having one entry per plugin would simplify things for the user. I suppose I could have a separate line for each processor/module/method combination. That would allow the greatest amount of control over the processing order.
I think having it in a separate box in the first column could be confusing. I would rather see it as an annotation such as "(Original Priority: xxx)" added to the end of the title.
As covered in the explanation, the user can click on a line and drag it to a new position. I specifically included that in the text at the top so that it was clear that the drag 'n' drop functionality was available.
Not currently. I haven't looked into it, but I suspect that it would significantly complicate the code. For something that would be used so infrequently, I wasn't convinced that it would be worth implementing.
They aren't currently because I didn't think it was necessary. I suppose it's possible if it's critically important.
This new functionality is only for metadata processing plugins. Other plugins (including cover art plugins, scripting functions, context menus, etc.) are not included in this new functionality. Again, I tried to make this clear in the instruction text at the top of the dialog. |
0ac6a86
to
47631c5
Compare
481350b
to
51c024a
Compare
I'm guessing that the checks failing to complete has something to do with the revised CI settings from the implementation of ruff? |
Yet another screen shot to show the latest changes. The "Move row" buttons now show as enabled or disabled as appropriate. I also added a label before the buttons to clarify their use. ![]() I think this now addresses all of @Sophist-UK's comments/requests other than being able to select multiple lines to move together, and the (abbreviated) titles on the buttons. ![]() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I generally like this idea. But not sure about some details of the order dialog:
- I agree with sophist that it is a bit confusing if multiple processors are involved. It would probably be better to be able to configure the order per processor.
- Showing the numeric priority is not very helpful IMHO. I would remove this. While technically the order is an int, practically we only use HIGH=100, NORMAL=0, LOW=-100
Also I don't think the placement of the new button works well. The horizontal space there is already very limited. Shortening the texts makes the buttons less clear, breaks existing translations and makes it generally hard to translate them. This seems like a bad move to release as a version we actually don't want to maintain too much anymore.
Either we find another place for this or we better reserve this change for Picard 3 only. We need to redo the plugins dialog anyway.
Okay, let's just leave this for Picard 3. I'll cancel the PR. |
@phw, I'm considering resurrecting this PR for consideration. Would you prefer to have the functionality available from the Plugins Options page with the button added below the current buttons (as shown in the previous message), or from a separate Options page under the "Advanced" section? Personally, I'm leaning toward the separate page under "Advanced" because it really is more of a niche advanced setting. That should also help eliminate any extra work of trying to incorporate this into a revised Plugins page for Picard 3. My intent is to allow setting the order for each Plugin / Processor / Method Called combination, as shown in my most recent screen shot. I agree that displaying the numeric value of the originally registered plugin priority is not very helpful, and will remove this column (which will help reduce the screen real estate required). Any other UI thoughts you'd like me to consider? |
@rdswift I agree with that. It has less impact on existing functionality.
Can't think of something specific right now |
Okay, I'm force pushing the version with the functionality accessed from a new options page. |
0b3bc6f
to
795b843
Compare
I like the column order and prefer the buttons on the right - but I am a single user so don't read too much into that. Otherwise the UI looks good to me. |
163135c
to
81d2e5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Let's have this in 2.14
Summary
Problem
Currently each plugin is registered with a priority (1-100) which sets the order of execution. Most plugin authors (myself included) don't pay sufficient attention to this, which can result in plugins being executed in the wrong order, yielding undesired results.
This is the Picard v2.x version of the change related to PICARD-3104 which is marked for Picard v3 implementation.
I wasn't sure if we wanted to include this new functionality in the final release version of Picard 2.x, but even if we don't it can serve as a possible model for the Picard 3 implementation.
Solution
Provide a new dialog from the Options... > Plugins page to provide a list of the registered metadata processor plugins, which can be rearranged to determine the plugin execution order. The execution order is stored in a new user setting.
Modify the
PluginFunctions
class to use the new execution order setting.Action
Additional actions required:
We need to determine if we want to include this setting in the user profiles. Currently we have no plugin settings as part of the option profiles, and I am reluctant to add this one.