Genre keeps changing

I like my albums at 100% matched but having an issue with inconsistent genre tags on some releases

Here is a file that it says is wrong and needs changing electronic → modern classical

So I save the file

Both now show Electronic when they should be Modern Classical, so I drop the album back into Picard and…

Now it does show it set Modern Classical but it wants to change Modern Classical → Electronic and so back where we started

I have no scripts set to do anything with genres, and these are the genre settings

Any idea what’s happening ?

1 Like

After this,

when you save, Picard must write down New Value.

Make a copy of the configuration file (or take screenshots of your settings if you can’t remember them) and restore the default settings.
If that’s not a problem.

There’s a small check mark somewhere blocking saving.

Everything works for me. My settings:

1 Like

I don’t understand this “Fall back” option, but it’s some kind of return or undo. Maybe uncheck it first.

Thanks for the reply, don’t think it’s a saving issue though.

After it had been saved and reloaded, it was showing as correct.

The issue is that on one load it says the genre should be Modern Classical, and then after a rescan it says the genre should be Electronic

Here is another example

And here it after a save and rescan

The value on the right, shouldn’t be changing surely.

1 Like

Fallback just means that if there is no genre set on a specific track it defaults to the artist genre so there is always something rather than blank. Did try disabling that, but didn’t help with this issue.

There’s no need to “rescan.” On your first attempt, save all changes. The disks in Picard’s right pane cannot have * asterisks.
In a week, launch Picard, add your music directory, and Picard will download the current tags (entered into the database by the editors) for your audio files. An album with even a single change will be visible with this * asterisk next to the disk.

I am rescanning only to illustrate the problem, the albums have a * no matter what I do.

The issue is that the “new value” should not be changing like this (unless it’s a recent edit by an editor, which in these it isn’t)

So here is what I think is happening, if you look up the track for the 112 song above you get this

That explains why in the first screenshot it wants to change Chillout → Contemporary R&B as that is the ‘top’ genre

Then once the new tags are written and you scan again it wants to change it back to “chillout”, and the only source for that is on the “Release Group” page here

So it’s not getting the data from the same source each time.

2 Likes

Unfortunately, this is where my knowledge ends. :wink: But I’m sure someone will help you.

1 Like

Do you have any plugin enabled that also does set the genre? If so it might be that plugin is competing with the built-in genre support.

3 Likes

I am only using 3 plugins, cluster, additional artists and remove perfect, so no nothing to do with genres. Same with my tagging script that only makes sure track numbers are 01 and things like that.

1 Like

First some data checking…

Here is the MB Release record: https://musicbrainz.org/release/301434dc-e59a-467d-b950-abfa9a2ad32e

This does NOT have a genre:

image

And here is the track record: https://musicbrainz.org/recording/79b64f15-7de1-4a6e-a66c-edc50671ac90

This has Modern Classical but NOT Electronic.

Here are the album artist *NSYNC genres: https://musicbrainz.org/artist/603ba565-3967-4be1-931e-9cb945394e86/tags

Just in case we are looking at track artist genres, here are the Phil Collins genres: https://musicbrainz.org/artist/401c3991-b76b-499d-8082-9f2df958ef78/tags

So still no Electronic.

The Release Group also has genres: https://musicbrainz.org/release-group/889be349-a960-4f2a-9dce-e554a306b3b1

And finally we find “Electronic” as a Genre.

So my guess is that Picard is flipping between the Release genre and the Release Group genre, but it is unclear whether this is an inconsistent MB response or an inconsistent Picard choice from consistent MB data. To attempt to work this out we need to check the MB data and see whether it is consistent or not…

I loaded the release into Picard and (assuming my settings were the same as @Tigggger 's) the API call is: https://musicbrainz.org/ws/2/release/301434dc-e59a-467d-b950-abfa9a2ad32e?inc=aliases%2Bannotation%2Bartist-credits%2Bartist-rels%2Bartists%2Bcollections%2Bdiscids%2Bgenres%2Bisrcs%2Blabels%2Bmedia%2Brecording-level-rels%2Brecording-rels%2Brecordings%2Brelease-group-level-rels%2Brelease-groups%2Brelease-rels%2Bseries-rels%2Burl-rels%2Bwork-level-rels%2Bwork-rels

We can load this URL into Chrome and look at the response. But there are LOTS of different genre-list tags in the response:

  • Release Artist genres - *NSYNC - Neither Electronic or Modern Classic
  • Release Group Artist genres - *NSYNC - Exactly the same as Release Artist genres.
  • Release Group genres - Electronic / Pop
  • Label genres - Jive - Neither Electronic or Modern Classic
  • Label genres - Legacy - Neither Electronic or Modern Classic
  • Track 2/8 genres - Modern Classical

As far as I can see when refreshing a few times, the MB response is the same - whilst this is not definitive, my guess is that it is Picard which is inconsistently choosing between Release Group genres and Track genres.

Second example

I haven’t done the same extensive analysis of the second example (Call My Name from 112 by 112) but Chillout is only a Release Group genre, whilst Contemporary R&B is both a Release Group and a Track genre).

Summary

I don’t have time to examine the code, but I have seen similar inconsistencies where e.g. multiple items are sent in different orders by MB for the same API call, resulting in a tag that has e.g. “Value1, Value2” on some calls and “Value2, Value1” on others, leading to exactly this sort of flip flop.

IMO, Picard needs always to be deterministic and deliver the same tags for the same underlying data, even if the sequence of data is different.

For genres this means:

  • Always using the same genre source in the same circumstances
  • Using the genre with the highest scoring genre
  • Using e.g. the alphabetically first genre where multiple genres have the same score.

As I said, I haven’t had time to examine the Picard code, but this is where I would suggest the next investigative action should be.

2 Likes

Thanks for the detailed reply @Sophist, if the API is returning the same details each time, then it does point to picard doing something inconsistent.

Logically it should really work upwards so starting at 1 and only moving on if there is no data

  1. Track, 2. Release, 3. Release Group, 4. Artist.
  1. Track
  2. Release
  3. Release Group
  4. Track Artist
  5. Album Artist

But you also need to decide:

  • Algorithm to decide which of multiple genres may be provided in whichever level is used. I would suggest that Picard selects the genres with the highest vote, and then the shortest genre string (on the basis that longer genre names often indicate sub-genres), and for those with the same score and string length the first alphabetically.

  • Which artist to use if there are multiple Track or Album Artists - these fields are always provided by MB in the same order, so I would suggest using the best genre from the first artist who has a genre (on the basis that this multiple artists are often e.g. Main artist WITH / FEATURING Second Artist).

1 Like

I think I identified the issue, I created a ticket for it: https://tickets.metabrainz.org/browse/PICARD-3246

3 Likes

@zas has coded a fix at PICARD-3246: Fix genre tag changing on every reload with equal vote c… by zas · Pull Request #3122 · metabrainz/picard · GitHub

1 Like

Thanks @Zas and @Sophist for your help getting to the bottom of the problem, my OCD thanks you :slight_smile:

1 Like