Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Report a bug or a problem.
Post Reply
ElVeeJee
Newbie
Newbie
Posts: 4
Joined: Wed May 04, 2022 10:27 am

Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Post by ElVeeJee »

Win 10 Pro/Home x64 / TGF 0.90B (TGF 0.89)
with TAG PADDING set to 001:

After Tagging my files I noted that that TRACK nrs were shown wrong in windows file explorer:
1-2-3-4-5-6-7-8-9-10-11-12... (tracknrs as in TGF)
Shows in file explorer as
1-2-3-4-5-6-7-8-8- 9 -9-10...
This pattern with duplicated track Nrs seems to repeat at the end of each decade :
... 18-18-19-19 .... 28-28-29-29 ...
After long experimenting is seems that there is going something wrong when writing the ID3.V2 tags.
Delete all Tags // Then Update ID3V1+ Remove ID3V2 results in the tracknrs to be shown correctly in Explorer.
Update ID3V2 + Remove ID3v1 results in the wrong shown tracknrs with duplicated 8-8-9-9...
Update ID3V1+ID3V2 gives also the wrong result.
Strange thing was that when reading the wrong displayed Expl. values (8-8-9-9) back into TGF,
they are shown correct in the TGF matrix (thus 8-9-10-11).
When applying a %R% - %A% - %T% for file renaming the correct tracknr is reflected in the Filenames. So only the tracknr tag field in the file seems to be affected.

It took me a while to figure out that the problem was related to fact that I did set the TAG padding to 001.
Reverting it back to 01 fixes the problem.
The FILE Padding to 001 does not cause a problem, only the TAG Padding to 001. I did not test with long paddings (0001 etc).
(I did test on different machines even with clean installed windows / I was on TGF089 and upgrade to TGF09B did not fix it)
For time being I work with File padding to 001 and Tag padding to 01.
Thanks for looking into the strange effect. I hope the above analyses lets you reproduce the error and fix it.

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Post by jtclipper »

I have tested a bit with various formats and the actual tag in the file is correctly set to the desired padding.
Also all the players I tested display the value of the track field correctly.

Windows Explorer however seems to :
1) force a numeric conversion of the given field stripping the leading zeros
2) in case of a xx/xx format strips the 'total tracks' part
3) in case of Vinyl tracks like A1, A2 ... it displays a 0

This happens both on Win10 and Win11

ElVeeJee
Newbie
Newbie
Posts: 4
Joined: Wed May 04, 2022 10:27 am

Re: Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Post by ElVeeJee »

Thanks for your feedback.
So it seems that windows explorer is messing up on the ID3V2 tags...
For windows explorer there more involved than "stripping" the leading zeroes as this would not explain the double Track Nrs. (8-8, 9-9...)
008 becomes 8 009-> 9 010-> 8 011-> 9 012->10 013->11 014->12 015->13 016->14 017->15 018->18 019->19 020->16 021->17

It also seem only to happen on ID3v2 tags. When the ID3.v2 are deleted and only ID3v1 are written the tracks nrs seem to be displayed correct.

And indeed Explorer does not like Alphanumeric in the TRACK Tag (Like your referred A1) etc... which turn into a displayed "0".

Seems Explorer "Likes" only IDV3.1 formats. There are no leading zeroes written into the ID3V1 tags and the Axxx format results in an empty ID3V1 Track Field. (I assume this in in line with the ID3V1 specifications). So this might explain while it seems Ok when only ID3V1 are used.

I assume the new [track/total tracks] format which allow a string format is new to ID3V2?

Interesting to Know: If You write a Padded track nr with an ending "/" then explorer displays the tracknr correctly (Without the leading "0")
In above Sequence the " 010/ " is displayed as " 10 " in explorer instead of the 'faulty' " 8"
(I tried this with another tagger as I can't get this approach to work with TGF as it strips of the "/" or does not apply the padding.)

Now we need to get the ERROR to the Microsoft guys so that they fix the explorer. Especially if it is still there in WIN11 also. Maybe there is someone around in the insider program who can get bugs reported in an efficient way ??

I understamd I need to live with the "01" padding setting for the time being as work around.
The other workaround with the trailing "/" can't be applied with TGF ...
Would need an 'option' to write trailing "/" in the track field upon writing. (And maybe does not make to much sense either? Or might "disturb" other apps ?)

Kind regards,

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Post by jtclipper »

You can use the xxx/ track setting like so :

In Options/formatting uncheck the 'Clean track field' option , use your desired padding '001'
After those are set you can set the Track field with the following variable

Code: Select all

%R%/

ElVeeJee
Newbie
Newbie
Posts: 4
Joined: Wed May 04, 2022 10:27 am

Re: Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Post by ElVeeJee »

Not sure if I fully understood the use of the variable...

if I apply your 'clean track' option suggestion, set padding to 001 and then apply the %R%/ in the TRACK as preset value (and 'use' selected) and then APPLY I get the "/" added to the track values and they can be written out.
They are correct read back with a [SCAN] and also appear likewise in another Tagger i Used for verification.
Win Explorer seems OK with it and displays the Track-nrs with the leading '0's stripped as well as with the trailing '/' stripped off.

The problem is that at each subsequent [SCAN] the track is read back with leading '0's and ‘/’ but with an additional '/' added so 010/ become 010// and so on. That cannot be the intention...
Or did I understand you guideline wrong and I'm I doing it the wrong way ??

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: Padding Tags to 001 causes Tracknrs to be wrong in WIN file explorer

Post by jtclipper »

You will need to use some scripting and in that case a script variable
You can go to File/Options/variables %...% on the user page at the bottom there is the script variables section
Click manage then File/New and paste the following

Code: Select all

//Append a '/' to the track field if not present
var
  sTrack: string;
begin
  sTrack := Trim( gTag.Track );
  if Copy( sTrack, Length( sTrack ), 1 ) <> '/' then begin
     var_result( '/' );
  end;
end.
After that is done click Apply and then OK
The new Track formatting value should now be

Code: Select all

%R%%@track.scv%

Post Reply