SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Fixing MB IDs

MB ID’s are UUIDs and have a fixed length.

Due to some (previously reported) weird issues I have had in the past that are no longer occurring on new files, many of my files have the last character repeated in one or more custom fields, leading to sometimes up to 45 characters in the MB IDs. When I tell Jaikoz to try and fix these albums, it won’t do much because it thinks there’s already an MB ID.

I propose that it would make sense to validate the field prior to using it , and try stripping characters (first leading, then trailing) to see if that produces a valid MBID in the case that it is greater than 33 without dashes or 36 with.

This perl regex would do both:

/[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}/i

The i modifier is case insensitivity just in case some other tool used uppercase, and we wouldn’t want to fail to validate that. Adding A-F to each character class would have the same effect but look less clean.

When using this to fix the aftermath of the bug I had encountered, looking up the mbid returns a valid result, and I would then need to update data from that existing mbid in order to fix the other fields (eg. release type “Albummmmmm”, mb artist id and unique id.)

I wrote a perl script to do this for my library but it would be nice if the replacement functionality had something similar or at least find/replace had regexp support and allowed you to specify your own column name.

I cant find a record of this original problem, its not been reported by anyoine else, do you have the original email ?

Hm, my apologies, I suppose I didn’t actually submit it, and here’s why…

I’ve only been able to reproduce it by fiddling with itunes, foobar2000, and jaikoz’ handling of id3v2.[34], but with default settings everything works OK. I’m not sure the issue that duplicates the last character is Jaikoz’s per se, but it’s definitely a character encoding issue - switching between id3v23 utf8/16 with and without byte order markers in the three apps triggers it at some point.

It only affects the user defined tracks (TXXX) as far as I’ve seen.

here’s the output of http://id3lib.sf.net/'s id3v2 utility for an affected file:

https://gist.github.com/765198

I can see that there could be a poential problem in that area, there were some changes in jaudiotagger library a while back which may have solved this if the problem lied there. Would be grateful if you caould see if you still get the problem with latest version ofg Jaikoz.