GNOME Bugzilla – Bug 677865
Missing leading zeros in ripped filenames
Last modified: 2012-09-06 18:42:30 UTC
When ripping CDs with naming option "Number - Title" chosen, resulting files have names with leading track numbers without leading zeros. They look like this: ~/Music/Jelonek/Jelonek/1 - BaRock.ogg ~/Music/Jelonek/Jelonek/2 - B.East.ogg ~/Music/Jelonek/Jelonek/3 - Vendome 1212.ogg ~/Music/Jelonek/Jelonek/4 - Akka.ogg ~/Music/Jelonek/Jelonek/5 - Steppe.ogg ~/Music/Jelonek/Jelonek/6 - A Funeral of a Provincial Vampire.ogg ~/Music/Jelonek/Jelonek/7 - Lorr.ogg ~/Music/Jelonek/Jelonek/8 - Beech Forest.ogg ~/Music/Jelonek/Jelonek/9 - War in the Kids Room.ogg ~/Music/Jelonek/Jelonek/10 - Miserere Mei Deus.ogg ~/Music/Jelonek/Jelonek/11 - Mosquito Flight.ogg ~/Music/Jelonek/Jelonek/12 - MachineHat.ogg ~/Music/Jelonek/Jelonek/13 - Elephant's Ballet.ogg ~/Music/Jelonek/Jelonek/14 - Pizzicato - Asceticism.ogg As you can see, sorting these files by their names might result in wrong track order. Other naming options do add leading zeros. Could there be an additional checkbox (on by default) to add leading zeros to track numbers? That would be much more flexible. Thank you for your work :) I wish you all best!
For future reference: Version 2.28 is more than two years old. Please use recent versions when filing bug reports. Thanks!
Oh, sorry. I'm using version provided with Debian 6. Guys are a bit out-of-date sometimes...
This is caused by the changes in http://git.gnome.org/browse/sound-juicer/commit/?id=59fc2c6523f Before the disc name was not added when needed to the filename, but the track number was 0-padded. After this change, the disc number is added when needed, but the track number is never 0-padded. Imo we should change the %dn pattern to 0-pad the track number, ie "01 - track.ogg" when there's only one disc, and "Disc 1 - 01 - track.ogg" when there are multiple discs.
Created attachment 223153 [details] [review] Zero-pad track number in %dn pattern 59fc2c6523f changed the "Number - Title" file pattern to use %dn instead of %tN. However, the track number is not 0-padded in %dn, which gives badly sorted tracks in some situations, and was the cause of several bug reports. This commit changes the %dn pattern to 0-pad the track number to restore things as they were when %tN was used. Let's hope there were not many users who preferred non-zero-padded filenames...
Review of attachment 223153 [details] [review]: Yeah that would work.
Attachment 223153 [details] pushed as dd99ea7 - Zero-pad track number in %dn pattern