Classical Extras 2.0

Apologies for the late reply. I didn’t solve it but I suppose your third suggestion would do the trick.

I came to the conclusion that if the work year is missing from the MB database, I still have to source that information manually so what’s adding three tags manually on top of that? It also helps me to learn which years belongs to which periods, so that’s something. :slight_smile:

You could just edit the composed year (or whatever) in MB - that way everyone benefits :slight_smile:

2 Likes

I’ve noticed two minor issues, but I see it regularly with my current workflow.

When I am adding a new CD to my library with Picard:

  1. Drag files into Picard
  2. Cluster
  3. Lookup Cluster
  4. Refresh Metadata
  5. Save (moves files)
  6. Make Edits in MusicBrainz
  7. Refresh Metadata
  8. (Save again)

Here are the two things that I consistently run into:

  • After item 3, CE claims there were no track files - is this a CE or Picard issue? I always have to run a second refresh to clear that message
    No file with matching trackid - IF THERE SHOULD BE ONE, TRY 'REFRESH' - (unable to process any saved options, lyrics or 'keep' tags)
  • After moving the files, CE has cached the old file locations, so I must delete the release and re-add it to Picard to avoid.

Here’s the trace of that second issue:

  File "picard\album.py", line 430, in _finalize_loading_track
  File "picard\metadata.py", line 532, in run_track_metadata_processors
  File "picard\plugin.py", line 250, in run
  File "...\MusicBrainz\Picard\plugins\classical_extras.zip\classical_extras\__init__.py", line 4324, in add_work_info
    self.process_album(release_id, album)
  File "...\MusicBrainz\Picard\plugins\classical_extras.zip\classical_extras\__init__.py", line 5665, in process_album
    self.publish_metadata(release_id, album, track, movement_info)
  File "...\MusicBrainz\Picard\plugins\classical_extras.zip\classical_extras\__init__.py", line 7373, in publish_metadata
    map_tags(options, release_id, album, tm)
  File "...\MusicBrainz\Picard\plugins\classical_extras.zip\classical_extras\__init__.py", line 2471, in map_tags
    orig_metadata = album.tagger.files[music_file].orig_metadata
KeyError: 'M:\\Audio\\Music\\E\\Empire Brass\\[1993] Class Brass On the Edge [Telarc CD-80305]\\04. Festive Overture.flac'

The KeyError above is the old directory location from step 5.

See the following section in the help file (under very technical matters…):

I’ve done a bit of research and observed the following behaviour in Picard when using the register_track_metadata_processor() API:

  1. If a new album (i.e. not yet tagged by Picard and with no MBIDs) is loaded, clustered and looked-up/scanned, resulting in the matched files being shown in the right-hand pane, then:
  • track.metadata gives the lookup result from MB - i.e. no file information, just the track info.
  • album.tagger.files[xxxx].metadata (where xxxx is the path/filename of the track) gives the file information (dirname etc.) and the tags on the original file.
  • album.tagger.files[xxxx].orig_metadata gives the same as album.tagger.files[xxxx].metadata
  1. However, if the album is then “refreshed”, this does not just carry out a repeat operation, instead:
  • track.metadata gives the same as before
  • album.tagger.files[xxxx].metadata gives the metadata as in track.metadata and also includes all the file information as before.
  • album.tagger.files[xxxx].orig_metadata gives the same as before (i.e. the original tags).

So, the ‘post-refreshment’ metadata is actually usable - by matching the musicbrainz_trackid of track.metadata and album.tagger.files[xxxx].metadata , you can get the file details of the track. Not elegant, but it works. But why is it necessary to “refresh” to get what seems like a logical data set? Basically, the metadata process is not complete when the plugin is called, so not all metadata is available to it.

I’ll look into the second issue.

That’s interesting (at least for us programmers!) - I would have thought that the orig_metadata would be replaced with metadata during the save, so it would be like you had just added the track. I wonder if the timing of the plugin calls should be a little different so we have consistent information.

Thanks for all the help - I’m loving the plugin and my classical music tagging is far better for it!

I’m having trouble getting Classical Extras to use the lyricist and composer artist credits rather than the standard artist name. Any tips?

Can you give an example release, showing what is not as you expect?

Track 2 is coming down as “前田尚紀” instead of “NAOKI MAEDA”.

I can’t replicate that - it works fine for me. What versions of Picard and Classical Extras are you using?

Picard 2.4.2
Classical Extras 2.0.12

This is what I see immediately after clicking on https://musicbrainz.org/release/9f0609c3-5e48-4058-8191-2c648971dbcc?tport=8000 without any files loaded:

Try selecting the sub-option “Fix non-Latin text in names (where possible and if not fixed by other naming options)”

That results in this:


but this is not correct either as it is still not using the artist credit from the MB Work. (In additional to discarding intentional Japanese capitalization, it also incorrectly changes credits on all other MB Works in the release.)

So we can say “Fix non-Latin text in names” is doing what it’s supposed to do, but I want “artist credits from the MB Work” which I still cannot figure out how to achieve with Classical Extras.

Select “Use alias for all work-artists/performers”

It looks like “Use alias…” is using artist credits from the Work. Thanks.

Does that mean the tooltip on “Use MB standard names” is incorrect? It says “may be replaced by as-credited name” but it was not doing so for me. Likewise, the tooltip for “Use alias…” does not mention as-credited names.

I’ll check exactly what happens and whether there are wording changes required when I get a mo. Meanwhile, I hope everything now works for you.

2 Likes

Hey @MetaTunes. I hope all’s well.

I have question, but I fully understand that this might be some border case about something that is not within the parameters of what your intentions for possible user cases of this plugin are.
So I can understand perfectly well if you are not willing to spend much (or any) time on this.

Here it is:

I am using Classical Extra’s to perfect satisfaction on a portable Picard install that is tuned and tweaked for my classical library. No desires there, I am a very happy camper.

But I have another portable Picard install that I only use for non-classical music.

For that installation I would like to be able to retrieve some additional ‘instruments’ information tags, which your plugin happens to make conveniently available:

_cea_instruments
_cea_instruments_all
_cea_instruments_credited

So I would very much like to use those in some scripts, but without Classical Extras doing (suggesting, writing) anything else.

I tried to accomplish that testing the available settings, but I can’t find a way that allows me to retrieve these variables, and immobilises CE doing anything else. (to other tags)

Am I overlooking some obvious setting? (wouldn’t be the first time…)
Is there a not-too-difficult way to achieve this?
(within the boundaries that my severely restricted coding abilities do allow me to open and maybe edit some .py files) or something like that)

This looks like a bug :pensive: Disabling the work parts section ought to achieve most of what you want but seems to no longer be working. I suspect something happened during a previous Picard update that I didn’t spot. I’ve been away from this for a while owing to other commitments but should get a bit of time over the winter months to update various things. If I can’t solve it right away I’ll put it on the todo list.

3 Likes

Correction. No bugs that I can see. You just need to uncheck the “include all work levels” box on the “Works and parts” tab. Then CE should run pretty fast and pick up all your instrument data. If you are reloading albums you have tagged before with works and parts and have saved those options with the file then you need to also disable the over-ride on the “Advanced” tab. It’s possible that you may also need to change other options to get what you want.
Let me know how it goes.

3 Likes

Thanks for the fast reply.

I just tested again, using a clean portable Picard installation, with only it’s basic settings adjusted to my usual preferences.
No other plugins or scripts. Only CE and a simple script that writes ‘CE all instruments’.

To enable retrieving the extra instruments variables, ‘Create extra artist metadata’ must be checked.
I disabled pretty much anything else on that, and other tabs that I could find.

Retrieving the instrument variables works fine then, but then CE will also want to touch the performers:
(in this case removing the entries that were retrieved while CE disabled)

Are there maybe some settings I am overlooking that could prevent this?

CE groups instruments by performer. I had left a hook in it to allow the option of providing separate tags for each instrument/performer combination. Is that what you want?

If so, and you are up to hacking Python, then just replace “True” by “False” on line 3803 of __init__.py, re-zip the package and replace it in the plugins folder.

Otherwise you will need to wait for me to add an option to the UI (I hadn’t done this before because of comments about there being too many options and no requests for this one). If you would like a UI option then any views as to where to put it are welcome.

1 Like