SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

2 digit track number instead of 3

Am I missing something? I’ve looked through all of the preferences but I can’t get rename file from metadata to use 2 digit track numbers. It insists on using 3 digits?

Thanks,
-Mark

It just uses whatever is in the trackno, so if its 2 digits it writes 2 digits, if its 3 digits it writes 3 digits.

And to think just a few days ago I was trying to make a case for regexp…

trackno.replace(/0-9/$1/) or something to that effect.

Though I guess technically it would be better to do something like substring

Forgive my psuedocode I don’t know if I have the js syntax down yet:
if (trackno.length > 2 ? trackno.substr(1) : trackno) + ’ - ’ + title

Update: If it is simply using what is in the field then why does both the track field on the main interface show two digits and metaflac output shows two digits?

metaflac --list shows:

comment[4]: TRACKNUMBER=01

Also, it still does it even when I set the tracks manually to be all two digits.

Like this

(trackno.length>0 ? trackno.replace(/[0-9]([0-9]{2})/g,'$1'):trackno)

Yeah this works

(trackno.length>2 ? trackno.substring(1) :trackno + '-' ) 

I was assuming you were using ID3, but Ive now tried with a Flac file and I still cant get the behaviout your seeing, perhaps a screenshot would help.

[quote=paultaylor]
I was assuming you were using ID3, but Ive now tried with a Flac file and I still cant get the behaviout your seeing, perhaps a screenshot would help.[/quote]

I’ll do that when I get home. Could it be a Linux thing? Make sure you try it on Linux, not sure why that would make a difference but I’ve seen stranger things.