Editing files in mm clears musicbrainz tags [#20976]

Help improve MediaMonkey 5 by testing the latest pre-release builds, and reporting bugs and feature requests.

Moderator: Gurus

TIV73
Posts: 245
Joined: Sat Nov 12, 2011 1:31 pm

Editing files in mm clears musicbrainz tags [#20976]

Post by TIV73 »

Hi,
I noticed a weird behavior in regards to extended tags. I've been tagging my music using musicbrainz picard for a while now, but when I checked my library a lot of musicbrainz-related metadata seemed to be missing.

Playing further around with this I was reproduce this behavior with the following steps:
  • tag two mp3 files with picard
  • open the two files in mediamonkey
  • select both files and open the properties dialog
  • change the value in the grouping field and save the files
  • extended tags created by picard will be gone
I made this video to demonstrate it - https://www.youtube.com/watch?v=23h3xiA54fk


I tested this with mediamonkey 2024.0.0.3018 without any addons other than the ones that mediamonkey ships with, and it doesn't seem to matter what field is updated, all fields I tested wiped the tags just fine. It is necessary to edit multiple files at once, though. Updating individual tracks has no impact.

This seems to be exclusive to tags created by picard. I tested creating additional tags in mediamonkey, quod libet, and mp3tag, and all those tags seem to survive just fine.
I can't really see the difference, though. The tags created by all 4 applications were regular TXXX frames without any notable distinction, save the encoding:
  • MediaMonkey: LATIN1
  • Quod Libet: LATIN1
  • MP3Tag: UTF16
  • Picard: UTF8

No idea if that has any impact or not, it's the only thing that I noticed being different at all, and I was frankly too lazy to write a script to convert around tags just to confirm a random theory.
Last edited by TIV73 on Fri May 31, 2024 2:39 pm, edited 3 times in total.
TIV73
Posts: 245
Joined: Sat Nov 12, 2011 1:31 pm

Re: Editing files in mm clears musicbrainz tags

Post by TIV73 »

Since I already have vscode open to check the files, here are the tags from different applications in mutagen, in case it's of interest:

Quod libet:

Code: Select all

FLAG23_ALTERFILE:
16384
FLAG23_ALTERTAG:
32768
FLAG23_COMPRESS:
128
FLAG23_ENCRYPT:
64
FLAG23_GROUP:
32
FLAG23_READONLY:
8192
FLAG24_ALTERFILE:
8192
FLAG24_ALTERTAG:
16384
FLAG24_COMPRESS:
8
FLAG24_DATALEN:
1
FLAG24_ENCRYPT:
4
FLAG24_GROUPID:
64
FLAG24_READONLY:
4096
FLAG24_UNSYNCH:
2
FrameID:
'TXXX'
HashKey:
'TXXX:QuodLibet::test2'
desc:
'QuodLibet::test2'
encoding:
<Encoding.LATIN1: 0>
text:
['FFF']
mp3tag:

Code: Select all

FLAG23_ALTERFILE:
16384
FLAG23_ALTERTAG:
32768
FLAG23_COMPRESS:
128
FLAG23_ENCRYPT:
64
FLAG23_GROUP:
32
FLAG23_READONLY:
8192
FLAG24_ALTERFILE:
8192
FLAG24_ALTERTAG:
16384
FLAG24_COMPRESS:
8
FLAG24_DATALEN:
1
FLAG24_ENCRYPT:
4
FLAG24_GROUPID:
64
FLAG24_READONLY:
4096
FLAG24_UNSYNCH:
2
FrameID:
'TXXX'
HashKey:
'TXXX:MP3TAGTEST'
desc:
'MP3TAGTEST'
encoding:
<Encoding.LATIN1: 0>
text:
['AAAADDD']
picard:

Code: Select all

FLAG23_ALTERFILE:
16384
FLAG23_ALTERTAG:
32768
FLAG23_COMPRESS:
128
FLAG23_ENCRYPT:
64
FLAG23_GROUP:
32
FLAG23_READONLY:
8192
FLAG24_ALTERFILE:
8192
FLAG24_ALTERTAG:
16384
FLAG24_COMPRESS:
8
FLAG24_DATALEN:
1
FLAG24_ENCRYPT:
4
FLAG24_GROUPID:
64
FLAG24_READONLY:
4096
FLAG24_UNSYNCH:
2
FrameID:
'TXXX'
HashKey:
'TXXX:MusicBrainz Album Id'
desc:
'MusicBrainz Album Id'
encoding:
<Encoding.UTF8: 3>
mediamonkey:

Code: Select all

FLAG23_ALTERFILE:
16384
FLAG23_ALTERTAG:
32768
FLAG23_COMPRESS:
128
FLAG23_ENCRYPT:
64
FLAG23_GROUP:
32
FLAG23_READONLY:
8192
FLAG24_ALTERFILE:
8192
FLAG24_ALTERTAG:
16384
FLAG24_COMPRESS:
8
FLAG24_DATALEN:
1
FLAG24_ENCRYPT:
4
FLAG24_GROUPID:
64
FLAG24_READONLY:
4096
FLAG24_UNSYNCH:
2
FrameID:
'TXXX'
HashKey:
'TXXX:cc'
desc:
'cc'
encoding:
<Encoding.LATIN1: 0>
text:
['ccvalue']
MiPi
Posts: 906
Joined: Tue Aug 18, 2009 2:56 pm
Location: Czech Republic
Contact:

Re: Editing files in mm clears musicbrainz tags

Post by MiPi »

I tested with several MP3 files - tagged in MB Picard 2.11 - opened in the last version of MM5 - tagged - and all files still contain all MB tags.
There has to be some other condition. Could you share with me two of your tagged files? I.e. files containing MB tags, before tagging in MM5 and losing the tags. Thanks.
TIV73
Posts: 245
Joined: Sat Nov 12, 2011 1:31 pm

Re: Editing files in mm clears musicbrainz tags

Post by TIV73 »

Sure, I'll upload the files and will PM you the link shortly.
TIV73
Posts: 245
Joined: Sat Nov 12, 2011 1:31 pm

Re: Editing files in mm clears musicbrainz tags

Post by TIV73 »

Hi,
reading your comment on how musicbrainz data isn't wiped on your end got me thinking, and was able to narrow down what causes the issue for me. I have an addon installed in picard that creates an additional custom tag called artist_relations_json, which contains a representation of artist relations for that track.

This additional tag is what's causing the issue. When I removed it everything worked fine again. This tag is just a plain TXXX tag like all other picard tags, no difference there. The problem is that the tag contains a json string with quoted properties, and the quotes trip up mediamonkey.

So the issue is not musicbrainz related at all, I just randomly stumbled onto it after tagging files with picard. It works with any custom tag, even if it's created from within mediamonkey.

Here's the new reproduction steps:
  • Take two mp3 files, make sure that both don't have any extended tags
  • Add a custom tag with name `a` and value `b` to the first file
  • Add a custom tag with name `a` and value `"b` to the second file
  • select both files and open the properties dialog
  • change the value in the grouping field and save the files
  • The first track will still have its extened tags, while the tag from the second one was wiped
Note that the ` characters above are intended as delimiters and should not go into the tag value

As far as I can tell this is specific to character `"`. Other variations like `‶`, `‶`, `″`, or `‶` work fine.
Last edited by TIV73 on Sat Jun 01, 2024 6:50 am, edited 1 time in total.
MiPi
Posts: 906
Joined: Tue Aug 18, 2009 2:56 pm
Location: Czech Republic
Contact:

Re: Editing files in mm clears musicbrainz tags

Post by MiPi »

Thank you very much for investigation, I can confirm this behavior. Inserted as: https://www.ventismedia.com/mantis/view.php?id=20976
I will fix it as soon as possible.
rusty
Posts: 8955
Joined: Tue Apr 29, 2003 3:39 am
Location: Montreal, Canada

Re: Editing files in mm clears musicbrainz tags [#20976]

Post by rusty »

Fixed in build 3029.

-Rusty
Post Reply