Please make Picard case-agnostic for tag names?

I would like to bump a request that was perhaps snowed under in an older 2.0.4. specific thread and I thought by now to give it it’s own thread.

It’s about this:

Cut to the chase:

Picard’s ‘Preserve these tags from being cleared…’ option is case-sensitive.
And I do not understand why that would be.

Today again I noticed that Picard was deleting my ‘keywords’ tags, because even though ‘keywords’ is present in the exclude list, my music player happens to write them as ‘KEYWORDS’, and then Picard says: ‘not good enough, delete’.

Probably related (and I’m pretty certain this has come up before on this forum) often in Picard’s left column you will see the same tag, but twice, once in capitals, and once in lower-case.
It will then delete the one, and write the other.

I’m sure the dev’s have an understanding why that is, but to me it seems a useless exercise that also pollutes/complicates the info in the left panel.

I hope that could be resolved in some manner too.

T.I.A.!

edit:
I should have mentioned, this is specific to idv3 TXXX frames.
Flac files are not suffering from this.

3 Likes

it is probably case sensitive that way if you only wont the lower case word you can filter out the uper case to keep things unerform across all songs

Can you please create a ticket for this ? With examples and/or screenshots.

I am pretty sure others (such as psychoadept) have raised this before, and there is a good chance there are already tickets for it.

If that’s not the case ( @psychoadept ? ) I will try to create one.

Thnx @Zas

edit:
If I split this up in separate issues, the ‘preserve tags’ issue seems straightforward, so I created a ticket for that one.

The other issue where Picard will sometimes display two lines for the same tag (one in capitals, and one in lower-case) is a bit more complicated, and ‘fixing’ that may have some unwanted consequences.
So I’ll leave it to others to perhaps share their thoughts about it, or else maybe just let it rest.
It’s only slightly annoying/confusing but it doesn’t do any damage.

1 Like

I did some more digging to see if I could pinpoint a bit better what is responsible for the sometimes confusing way Picards seems to handle casing of tags.

Contrary to what I first believed, namely it only being some id3 TXXX issue, there is also an issue with how Picard handles vorbis tag names.

It’s easy to replicate to show what I mean:

Create a script: $set(DISPLAY ARTIST,%artist%)

Now run this script on both an mp3 and a flac file.
Picard will write DISPLAY ARTIST for both, and all seems well.

Now run both files through picard again.

For the mp3 Picard will still display DISPLAY ARTIST, and will make no changes to it. That’s as expected, so no problem there.

But for the flac file, Picard now shows both a line for ‘display artist’ it wants to delete, and a new line for ‘DISPLAY ARTIST’ it wants to create.

It’s not something fatal, but it does seem like a bug to me?

Please let me know if this is enough info, or if creating a ticket for this would be useful/appreciated.

Now try DiSpLaY ArTiSt and have even more befuddlement in there…

I am no expert… but I thought tags have always been case sensitive. I remember confusion I used to cause myself when trying to manually add MBID tags to MP3 and FLAC using MP3Tag I’d keep tripping over the different case in use. Then turned to Picard for sanity instead.

I’d agree with your initial request though - a case insensitive preserve list would be handy.

There is a page in the Picard documentation that shows what it is actually reading. I’ll try and find it… careful trying to reverse engineer this stuff as often what you see in the GUI is a human readable version of the actual tag and\or tag contents.

https://picard.musicbrainz.org/docs/mappings/

Just to add to the confusions… notice how the FLAC tags tend to be upper case and the MP3 tags were lower case.

1 Like

ID3 tags are case sensitive by definition, Vorbis tags case insensitive. But I know some implementations differ here. For Vorbis it is kind of a convention to use tag names in all upper case, but strictly speaking this would not be necessary.

For this request here I totally agree to make the ignore list case insensitive, that absolutely makes sense. Other use cases, e.g. reading TXXX tags case insensitive, might need some additional thought, I’m not too sure about this right now.

4 Likes

I believe there is an important difference between how Picard handles casing internally, and how it displays their names in the left panel.
If I am correct, in the left panel there are some algorithms at work that make all ‘known’ tags pleasant to read there.
They will be written by capitalizing the first letter of the word, irrespective of how they actually are written in the tags themselves.

It looks like for ‘unknown’ tags, id3 names are displayed as they actually are, but for vorbis they will be displayed in small case, even if they are actually all-caps.

I’m not completely sure about all this though, and the ones that really know and understand are the coders of course.
I’m gonna leave this for today, else my eyes won’t even be able to read a book tonight :wink:

Not exactly. Picard has a list of internal tags that it maps to different tagging formats. That way unified tagging is actually possible. E.g. in Picard you just have to take care of a tag called artist, you don’t have to care about that this tag will be written to format specific tags with inconsistent names like e.g. TPE1, ©ART, Author, Artist and ARTIST.

Each of those tags has an internal name, which you also use in scripting (%artist%) and a human readable display name (“Artist”) which also gets localized (e.g. in German “Künstler”).

Yes, this is exactly what is happening. For Vorbis the reasoning is that internal (known) tag names in Picard are all lower case, so it displays Vorbis tags as lower case as well. Lower casing all Vorbis tags when reading also ensures they are read case insensitive, which is what the specs they. When writing Picard will write all Vorbis tags in uppercase though, because this is what is commonly done by other software.

ID3 tags are case sensitive by definition, so they are read and written case sensitive. But there is some argument to be made for treating TXXX tags case insensitive (Mp3Tag does this AFAIK).

1 Like

There has been some discussion about capitalization of TXXX tags at https://tickets.metabrainz.org/browse/PICARD-1101.

I’ve done some more thinking about this.

Lets distinguish between known tags and unknown tags for Picard.

For known tags:

Picard displays them in the left column with the first letter in capital.

In scripts you write them in lower-case, and Picard has an internal mapping that decides how the tag is written for id3 and vorbis.
But as long as you use lower casing in the scripts, the left column will always show the name with the First Letters In Capitals, and you don’t have to worry much.

For unknown tags:

It is somewhat unpredictable how the left column will display the tag name.
In a script you may have written an unknown tag in a specific casing, but depending on id3 or vorbis, it may be displayed in lower-case or in capitals in the left column.
It will also depend sometimes if Picard is reading the tag or writing the tag.
So, quite a lot of confusion there.

That’s a bit of a problem since you also have to worry about how you write their names in scripts, and it’s also not possible to get it right always for both id3 and vorbis.
(There is an option to add some code to write for specific formats, but it is a bit cumbersome, and if I am not mistaken that can/will create duplicate tags.)

So, for known tags Picard has an internal mapping system that is not disclosed to the user.

E.g.:
Artist will be displayed in the left column as Artist, for id3 it will be TPE1, for vorbis it will be ARTIST.
Artists will be displayed in the left column as Artists, for id3 it will be TXXX/ARTISTS, for vorbis it will be ARTISTS.
AcoustID will be displayed in the left column as AcoustID, for id3 it will be TXXX/Acoustid Id, for vorbis it will be ACOUSTID_ID.
etc. etc.

Wouldn’t it be an idea to introduce a mapping option for unknown tags in Picard?

Then you can always write their names in lower case in scripts and don’t have to worry about that, and in a mapping panel you can set something like:

image

It could be a new option available under ‘advanced’.
For ‘normal’ users nothing would change, but power-users can get their tags exactly as they need them to be so that Picard works well with the music player/manager of their choice.

And in Picards left column, for tags that have a tweaked setting in the mapping page, the font color could perhaps be a different one, so you can easily distinguish known tags from unknown or custom mapped tags.

Thoughts?

1 Like