mpogue2 / SquareDesk

Fully-featured music player and sequence designer, designed for square dance callers
10 stars 4 forks source link

Bug: MP3 filename parse problem with lower case letters #527

Open mpogue2 opened 5 years ago

mpogue2 commented 5 years ago

From Rob B (Mac OS X): "Just bought 2 recordings from Throw Back Tunes. When loading them they wouldn’t display correctly they came in displaying tbt XXX - name.mp3. It displayed as tbt - XXX - name in the Title column . Displayed correctly in the program when I changed the recording to TBT XXX - name.mp3. i.e. changed tbt to TBT."

Looks to me like many of our regExp's are [A-Z] and the actual match is not caseInsensitive. (We should probably check all of the string comparisons to figure out whether they should be made case insensitive.)

danlyke commented 5 years ago

I think I was deliberately case sensitive to try to pick up labels, but I'm open to other interpretations.

mpogue2 commented 5 years ago

Yeah, I'm not sure why TBT doesn't follow the normal uppercase convention for LABEL <#>. I'm not clear from Rob's report whether there was an extra "-" in there between LABEL and <#>. If so, that would make it more ambiguous with our current regExp's.

Perhaps if we designed the regexp's to allow a max of X (upper or lower case) characters in the LABEL, that would help it to be less ambiguous (since most Titles are >X characters). We could also further disambiguate by making the LABEL be consistent case (e.g. tbt or TBT, but not Tbt), while the Title is almost always mixed case. This would disambiguate titles like "tbt 123 - Home.mp3".

Or, maybe we ought to just bite the bullet and have a hard-coded list of label names, and add a regexp to the list that looks for exact label match first (case insensitive), and only if that fails does it try to apply the other rules. The number of label names is not big, so the match is likely to succeed a lot of the time.

Or something like that... :-)