IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

 
Reply to this topicStart new topic
> Changing track number format from x/y to x
pjetson
post Jun 18 2012, 08:30
Post #1


Member


Group: Members
Posts: 2
Joined: 18-June 12
From: Australia
Member No.: 16588
Mp3tag Version: 2.51



For quite some time, I've been "annoyed" by the variations of track number formats in my MP3 files. Some have just digits (my preference), some have leading zeros, some have x/y, and so on. I haven't been able to come up with an easy way to change them. Until now!

V2.51's Convert Tag-Tag function works a treat, but it took a little while to work out how to do it.

Just set the FIELD set to TRACK, and the FORMAT STRING to $add(%track%,0)

I hope this helps someone else.

Regards,
Peter
Go to the top of the page
 
+Quote Post
dano
post Jun 18 2012, 10:01
Post #2


Moderator


Group: Moderators
Posts: 5673
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.59a



There is a dedicated function for track number formatting which should be used:

$num(%track%,1)


--------------------
Go to the top of the page
 
+Quote Post
pjetson
post Jun 18 2012, 11:25
Post #3


Member


Group: Members
Posts: 2
Joined: 18-June 12
From: Australia
Member No.: 16588
Mp3tag Version: 2.51



QUOTE (dano @ Jun 18 2012, 19:01) *
There is a dedicated function for track number formatting which should be used:

$num(%track%,1)

Hi, Dano. $num is not a dedicated function for track numbering, it's a general purpose function for turning a number into a string with leading zero padding to the specified number of digits. It can't do what I wanted to do.

The $add function works (as far as I can tell) because it converts the existing track number string into an integer, which effectively drops any zeros before the number, and any non-numeric characters after the track number. It then adds the second argument (in my proposal a zero) to the track number, then converts it back to a string. That's exactly the function that I required to standardise my track numbers, and I thought it may be useful to others.

Regards, Peter

Go to the top of the page
 
+Quote Post
dano
post Jun 18 2012, 13:54
Post #4


Moderator


Group: Moderators
Posts: 5673
Joined: 4-September 03
From: Germany
Member No.: 201
Mp3tag Version: 2.59a



Why not? $num also deals with the x/y format:
$num(5/9,1) => 5


--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st April 2014 - 11:27