Get Picards "Preferred Release Countries" in a python script?

Hello,

After having some problems with understanding labels for music videos, I realized I should try and refine my music video script a bit.

One way I thought to do that was by getting the list of preferred countries a user may have set in picard and creating a list of albums based on that.

But I have no idea how to get the Users preferences in the python script. So I was wondering if their was a way to do that.

There is, this should be what you are looking for:

from picard import config

preferred_countries = config.setting['preferred_release_countries']

preferred_countries should be a normal python list.

You can even create your own preferences for your plugin and have its own page in the options, it’s pretty simple. Let me know if you’d like me to help you set that up.

4 Likes

Thank you! Sorry I didn’t reply I sort of come and go.

I’m taking a break on messing with the music video plugin. I got it to work well enough that I started using it on my music videos, and tested it more that way.

Though before I take a break I will update the original topic I posted it on with the new plugin, the old one didn’t even work it would just crash. That is my bad.

I’m not sure when I’ll go back to working on it, Adding this preference thing would be cool, and theirs a crash I can’t figure out. But, if anyone else wants to mess with the script they are welcome to it. I say that in the description but it’s probably good to reiterate it.