Classical Extras 2.0

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.

Hmm. Not sure if there’s much I can do about that. The way in which plugins interact is a bit of a mystery to me and I don’t use any of those. I’ll have a bit of a play around but perhaps @outsidecontext has some ideas?

I’m seeing the issue with Picard 2.3.2 and 2.4.0b2. CE version 2.0.11.

I just tested using this release: Music for Oboe & Strings

Here are the relevant settings (let me know if you need something else):



One interesting thing here - if I uncheck the Use genres from MusicBrainz, the duplicate for Classical goes away, but Chamber music remains.

I turned on debugging logging for CE. There was a lot to look at, but this looked relevant:

Classical Extras: In process_work_artists for track:...
...('a078bbe8-0aef-4281-ad16-e9f3869d954e',): defaultdict(<class 'dict'>, {'name': 'Quintet for Oboe and String Quartet, GP 258', 'is_collection': False, 'folks_genres': ['chamber music', 'classical'], 'worktype_genres': [], ...

Those are the two genres in this case that get duplicated.

If I turn off the Folksonomy work tags, the duplicate Classical goes away. I haven’t found an option that will remove the duplicate for Chamber music.

I have worked around it with a tagger script to remove the duplicates.

Let me know if there is anything else I can do here. Thanks!

I tried all the plugins that you say interfere with CE. The only one that seems to cause problems is Wikidata Genre. Until there is a solution, I suggest you don’t run CE and WG at the same time.

Thanks for the screens @thebradleys - that helps a lot. The problem seems to be with the Picard Metadata option “Fall back on album’s artists genres…”. Whenever that is selected (without folksonomy tags as genre) then I get duplication if I also have “existing file tag” selected in CE. It should be unnecessary to select the Picard option anyway, since you can select (and have selected) “Infer from artist metadata” in CE.

I’m puzzled by how “Fall back on album’s artists genres…” works, however, as if I deselect all the CE genres and leave that as the only selection, it seems to do nothing. Anyway, the solution is (I think) to do any of the following:

  • uncheck “Fall back…”
  • check “Use folksonomy tags as genre”
  • uncheck “Existing file tag” in CE
3 Likes

Thanks - that works for me! I use CE for all my albums, do think that will have any problems with those options unchecked? I will experiment with it tonight to see.

I managed activating “Album Arist Website” but non of the others listed without CEs “works and parts” section failing:
AcousticBrainz Mood-Genre
AcousticBrainz Tonal-Rhythm
Album Artist Website
Last.fm.ng
Wikidata Genre

I guess I have to switch plugins for tagging classic and other stuff.

I would just uncheck “Fall back…” that should work and CE will pick up genre info from artists.

2 Likes

Once you have used Wikidata Genre it will mess up the work info for CE, even if you then uninstall it. The problem is easily fixed either by restarting Picard with WG uninstalled or just uncheck “use cache” at top right of CE’s works and parts tab - that will force CE to get the works data again. I’m pretty convinced that it is only WG that is the problem.

I tested again. You are right, all the other plugins work. It is only Wikidata Genre and I can do without that.
“Fall back…” is not activated, as the whole section “Genre” is unchecked.
While testing before I might have tested WG at first and than refreshing was not enough.
Thank You for your help!

2 Likes

Is it possible to hardcode the text to be black?
My system’s dark theme makes this plugin unreadable.