Classical Extras 2.0

That’s it - thanks! I thought it had to be something like that. I looked at the settings a few times and just didn’t see it.

Is it possible to launch classical extra only when genre=classical (to not update ‘stamp’ or ‘artists_options’ on every track) ?
(Question from a newb :slight_smile: )

Not at the moment, AFAIK. That would require Picard to selectively launch plugins depending on tag contents.
OTOH it might be possible within CE to by-pass it’s own processing if genre!=classical. That would assume that the genre tagging is all correct to start with - part of the plugin’s functionality is to determine if the music is classical.
Since you would have to pre-tag your files accordingly, I would have thought that an easier solution is to use separate folders for classical and non-classical music and only use the plugin for the classical folders.
That said, I use it for non-classical music too. Where there are no works, it runs at a reasonable speed and I find the artists section still adds value.
Another option, if you let it run on everything, is to do any subsequent clean-up you need using tagger scripts - these will run after the plugin.

2 Likes

Hi. I’ve got a problem with Picard 2.3.2 on Windows crashing and I think it’s Classical Extras that is causing it. It happens consistently when I hit the “Tagger” button in my browser for https://musicbrainz.org/release/08254841-645d-4141-b5ef-a63d6a1b8aae and I believe it’s the work in medium 30, track 3 which is the trigger.
I’ve run Picard with the -d option redirecting stdout and stderr to a file and here are the last few lines of console output:
D: 15:20:47,110 webservice.ratecontrol.decrement_requests:146: (‘musicbrainz.org’, 443): Decrementing requests to: 1
D: 15:20:47,111 webservice.handle_reply:434: Received reply for https://musicbrainz.org:443/ws/2/work/c9b692bf-5d38-3ee1-b1cd-2520bc2e9c81?inc=work-rels+artist-rels+label-rels+place-rels+aliases+tags: HTTP 200 (OK)
The file has:
Traceback (most recent call last):
File "picard\webservice_init
.py", line 462, in process_reply
File "picard\webservice_init
.py", line 449, in handle_reply
File "C:\Users\James\AppData\Local\MusicBrainz\Picard\plugins\classical_extras.zip\classical_extras_init
.py", line 5012, in work_process
ValueError: (‘d211fc24-75ae-4c06-978a-27048fa37877’,) is not in list
This was in 2.0.7 but I’ve just installed 2.0.10 and the issue is still there.
Let me know if you need any more info. Thank you.

1 Like

I’ll look into it when I get a mo. My head is full of php and js at the moment, which is very bad for my python!

A post was split to a new topic: Count which composer has the most tracks with tagger script

I’ve been alerted to a small bug in the plugin that affects tracks where Picard cannot supply a work. I’ve done a PR for it (https://github.com/metabrainz/picard-plugins/pull/261). Hopefully it will get approved soon (@outsidecontext ?).

1 Like

Thanks @MetaTunes. I merged your changes. We just need to update the website, but we need to do this anyway. @zas, can you take care of this?

If I’m tagging an album where 10 out of 20 tracks contain the work year and the others don’t, and I use another source to fill in the blanks. Is there a way for CE to recognize this? I refer to that tag to format other tags and as I understand it, period is also inferred from this tag. If I refresh using ctrl+R the info I added disappears. I’ve tried saving the album with all the work year tags filled in and then reloading the album and also using “Add to ‘Preserve Tags’ list” but it was unsuccessful.

Have you tried adding the tag you want to preserve in the 3rd box on the “Tag mapping” tab of CE (and omitting it from the main Picard “preserve tags”) option?

Tried it and he’s not having it. Actually it doesn’t seem to keep that tag at all even after adding it to the tag mapping box. This is what it looks like, keep in mind that I’d already selected “Use original values” in this screen but I verified it after the fact, that tag is being overwritten despite adding it to keep (in the plugin settings, not main picard settings):

1 Like

Has anyone seen an issue where the genre tag is growing with duplicates?

For example, the current file has
Classical; Orchestral; Suite

After running through Picard and CE, it wants to change it to:
Classical; Classical; Orchestral; Suite

If I save and refresh, it will add another Classical to the front each time.

Yes, and I solved it for my situation with a script.
It’s a pretty large script, so I tried to extract/edit only the crucial part of it for you:

$if($not(%genre%),$set(genre,_))
$setmulti(_genretemp,$title(%genre%))
$copymerge(_genretemp,$title(%genre%))
$setmulti(genre,$rreplace(%_genretemp%,_,))

Be sure to test it well on some testing files. I have not tested this extracted version myself very well.

(I have a gut feeling there must be a simpler way, so if somebody else has a simpler suggestion…)

1 Like

That’s a great workaround - thanks! You’re script works perfectly as is. It does seem like it could be simpler, but we would need a $copymerge like command that returns the result instead of setting one of the parameters.

It seems like Picard should have automatic sanitization of multi-value tags; I can’t think of an example when it would not be helpful.

Great.

Note that the script is slightly more complicated than should be necessary so to avoid a current bug in Picard.
When Picard 2.4 is released, the first line, and the part in the last line that removes underscores can be removed.

1 Like

Dear MetaTunes,
thank you for your plugin! Although I still have to firgure out all the settings and their implications.

One thing confuses me, in “work and parts” I activated all three checkboxes at the top, the rest I left untouched (I think).
I tested with some of my files and to be sure with the examples from this thread like Vivaldi, I loaded them into Picard and when I check with “view script variable” there are no “_cwp” variables at all, _aae, _ce and _cea variables are shown. Is there a setting which I have to activate or which might prevent the plugin to show those variables?

I use Picard 2.3.2 and Classical Extras 2.0.11.

Hmm. I have that release. I’ve just checked and can’t replicate your problem, but I haven’t updated to Picard 2.3.2 yet, so I’ll do that and try again. Do you have any other plugins active?

@Tybot Re your problem with work years. Have you solved it? If not, maybe the following will help:

  • You have to restart Picard to pick up any changes you make in file tags.
  • You cannot directly set the tag “work_year” (or whatever you have called the tag that CE uses for the work date) as CE will over-write it (including with blank if it cannot create a year)
  • If you set a different tag (e.g. “work_year2”; put it in the “keep” list) and then map that to work_year, with “Conditional” checked, CE will fill the work_year tag with the contents of work_year2 if it cannot create a work_year from the MB database.

I can’t replicate the classical genre duplication problem. Which versions of Picard and CE are you using?

Thank you for your quick answer!
I have several plugins installed and I tested them after I read your reply.
This group is no problem:
Abbreviate artist-sort
AlbumArtist Extension
Decade function
Disc Numbers
Feat. Artists Removed
Padded disc and tracknumbers
Release Type
Smart Title Case
Standardise Feat.
Standardise Peformers

But any of these plugins will hinder CE from showing the work and parts variables:
AcousticBrainz Mood-Genre
AcousticBrainz Tonal-Rhythm
Album Artist Website
Last.fm.ng
Wikidata Genre

Next to the missing variables, CE does not write the “Comment [workparts_options]” tag.