How can I force Picard to fill a tag (not let it empty)?

Is it possible that Picard checks for a specific tag if it is empty and if so, present a warning or input box for this empty field?

Example:
Whenever the genre is not set in the tags, Picard should warn me and let me enter a genre for the track(s) without genre.

How can I do that?

Hi,

I don’t know if it’s possible to show a warning box. What I do is to set empty tags to a value that is easy to find in Picard:

$if($not(%genre%),$set(genre,***** UNSET *****))

This can be done using Picard’s tagger scripts.

Regards,
Andreas

2 Likes

Good idea, @amair!
But you have to control such tags visually, right?
There is no “stop, there is something wrong with your tags” function or warning box or blinking red tag?

@InvisibleMan78: you’re right, it needs visual control. Maybe you can write your own plugin: https://picard.musicbrainz.org/docs/plugin-api/

1 Like

Unfortunately, I don’t know how to start.
Whenever I try to copy an existing plugin and change some minor things, I can’t get it listed or installed under “Plugins”.

That way seems much to complicated for me :sleepy:

The plugin list in picard is generated from github.
Once you have written your plugin and had this merged with the repository it will show up for everyone.

For you own version of plugins you can put it in the configuration folder.
On unix this is .config/MusicBrainz/Picard/plugins/
on windows it is usually something like users\your_username\AppData\Roaming\MusicBrainz\Picard\plugins

To star copy a python file to one of those directories and edit as needed.
Writing plugins is not trivial but it is something you can learn in a few weeks depending on your programming skills.

3 Likes

It does seem to take a while for the pull requests to be reviewed and accepted though, because there are a few outstanding PRs. I suspect that the Picard team is focusing their attention and energy on 2.0 development, rather than plugins developed for 1.4.

[quote=“dns_server, post:6, topic:295723”]Writing plugins is not trivial but it is something you can learn in a few weeks depending on your programming skills.
[/quote]
What would you recommend as programming GUI?
Is there something like “Visual Studio” for other languages like python?
(Update:
Found it: https://docs.microsoft.com/en-us/visualstudio/python/installation)

Do I really have to restart Picard for every little plugin change or how can I reload a modified plugin during development?

Picard uses QT toolkit to create the GUI.
For picard 1.x this uses QT 4.
For picard 2.x this uses QT 5.
It is not practical to use another library when building a gui.

Most ide’s have support for python including visual studio.
There is QT creator that is designed for writing gui programs using QT.
This may be useful to when modifying the xml file that describes the layout but you may be able to work that out yourself.
Personally I use vim on unix or notepad++ on windows.

You probably do need to restart python when modifying the python file as this is loaded once during startup or the first time the plugin is activated in the gui.

You may want to look at the viewvariables as a stating point as this has some gui code.

3 Likes

I use this line in my script:
$if($not(%genre%),$set(genre,*☻☻☻☻☻☻☻☻*►►► GENRE IS EMPTY ◄◄◄*☻☻☻☻☻☻☻☻*))

Sometimes it would be even better If this line could be shown in another color.
Is it possible to use some special font color code?