[Logo] Jaikoz and SongKong Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
2 digit track number instead of 3  XML
Forum Index -> Jaikoz Issues
Author Message
markfaine

Pro

Joined: 10/04/2008 19:58:02
Messages: 150
Offline

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
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 7208
Offline

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.

thanks Paul (Administrator)
markfaine

Pro

Joined: 10/04/2008 19:58:02
Messages: 150
Offline

paultaylor wrote:
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]([0-9]{2})/$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.
paultaylor

Pro
[Avatar]

Joined: 21/08/2006 09:21:27
Messages: 7208
Offline

markfaine wrote:

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

trackno.replace(/[0-9]([0-9]{2})/$1/) or something to that effect.
 

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


markfaine wrote:

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

Yeah this works
Code:
 (trackno.length>2 ? trackno.substring(1) :trackno + '-' ) 
 


markfaine wrote:

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.
 


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.

thanks Paul (Administrator)
markfaine

Pro

Joined: 10/04/2008 19:58:02
Messages: 150
Offline

paultaylor wrote:

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. 


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.
 
Forum Index -> Jaikoz Issues
Go to:   
Powered by JForum 2.1.6 © JForum Team