[X] Track number incorrectly shown with Track Count

When renaming a file from the Convert Tags -> Filename option, %track% shows a combined value of both the track number and track count instead of just the track number. The Track field in main window will show 10/37 but the "Tag - Filename" dialog shows 1037 instead. I've attached a screenshot of the Tag - Filename dialog as an example.

I found a workaround for this by using the $num function as so: $num(%track%, 2)
This will show the track number correctly.

Where is the bug? 10/37 would lead to an illegal filename as the / is not allowed ...
What you call a workaround is the usual way to do it.
you could use the $validate() function to replace illegal characters with something else than "nothing".

Instead of storing a combined value x/y into the tag-field TRACK, ...
you may use two separated tag-fields TRACK and TOTALTRACKS.


Most programs I've used store both of these fields in the "TRCK" frame.

Shouldn't Mp3Tag parse and show these values seperately?

MP3tag acts according to the user's actions.
So as the x/y contents is valid for the track field, it shows the field as is.
If you want to store the values in separate fields, then MP3tag would have means to show them.
The track field itself poses no problems as it stays a field.
if you use it to generate a filename, you have to accept the confines of the filename conventions (where the slash is invalid).
The $track() function converts numbers and as the / is no valid character for a number, only the first part gets treated...
So I still think: no bug.

You may follow the ID3 v2.x standard.
You may use Mp3tag as you want it.
If you like a combined "Track/PosInSet" string value in the tagfield TRACK, then do it this way.

Keep in mind, that the target filesystem, where a media file should be stored, has its own rules for creating a fitting filename.
As you have learned already ... Mp3tag does create a proper filename by suppressing forbidden characters.
You can use the function $validate() to apply a user defined replacement character or string.

If you want to play with the tag-field TRACK, then try these formatstrings ...

You can try out and check any formatstring within the preview of the converter "Tag-Tag" [Alt+5].


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.