Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [0.9.5 b3] Reading Tracknumber tags (Read 1434 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[0.9.5 b3] Reading Tracknumber tags

My mp3s are often tagged with 3-digit tracknumbers in both ID3v1 and ID3v2.3 in mp3Tag, but this used to create problems with foobar.  It would display track 128 as -128, track 129 as -127, and so on.

In foobar 0.9.4.4, I had a nifty script I put in the tracknumber column,

Code: [Select]
$ifgreater(-99,%tracknumber%,$add($select(%discnumber%,256,256,512,512,0,768,0,1024,1024),%tracknumber%),[%tracknumber%])

which would turn the tracknumber "-128" in foobar into its correct tracknumber of 128, and so on, as long as the discnumber matched the first digit (hundreds digit) of the tracknumber.


However, in 0.9.5 beta 3, foobar's handling of "incorrect" ID3v1 tracks has changed.
Tracknumber 128 is now 4294967168, and tracknumber 129 is now 4294967169.

I've tried to modify my code to reflect the change in foobar 0.9.5's handling of tracknumbers, but something has always gone wrong.

Code: [Select]
$ifgreater(4294967040,%tracknumber%,$sub(%tracknumber%,4294967040),[%tracknumber%])
has the exact same effect as my original code, even though the offending tracknumbers in question are slightly above 4294967040.

Code: [Select]
$ifgreater(42000000,%tracknumber%,$sub(%tracknumber%,4294967040),[%tracknumber%])
has made tracks 128 to 153 (and then some) display properly, but turns everything else incorrect.  Track 127, a non-problematic number, becomes -4294966913, track 126 becomes -4294966914, etc.


Basically:
In my scripts, the number of digits in the numbers differ; does foobar not support numbers beyond a certain point in scripts?  But the main question is, how has tracknumber reading changed?

 

[0.9.5 b3] Reading Tracknumber tags

Reply #1
Looks like an attempt to workaround the old problem with track numbers >127 went wrong, thanks for the report. Changed for beta 4, your titleformatting workarounds should no longer be needed when it's released.
Microsoft Windows: We can't script here, this is bat country.