After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677865 - Missing leading zeros in ripped filenames
Missing leading zeros in ripped filenames
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: ripping
2.28.x
Other Linux
: Normal trivial
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-11 14:51 UTC by unfa
Modified: 2012-09-06 18:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Zero-pad track number in %dn pattern (2.64 KB, patch)
2012-09-01 19:02 UTC, Christophe Fergeau
committed Details | Review

Description unfa 2012-06-11 14:51:09 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!
Comment 1 André Klapper 2012-06-13 15:40:34 UTC
For future reference: Version 2.28 is more than two years old. Please use recent versions when filing bug reports. Thanks!
Comment 2 unfa 2012-06-13 21:29:31 UTC
Oh, sorry.
I'm using version provided with Debian 6.

Guys are a bit out-of-date sometimes...
Comment 3 Christophe Fergeau 2012-09-01 18:55:29 UTC
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.
Comment 4 Christophe Fergeau 2012-09-01 19:02:04 UTC
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...
Comment 5 Ross Burton 2012-09-01 21:25:36 UTC
Review of attachment 223153 [details] [review]:

Yeah that would work.
Comment 6 Christophe Fergeau 2012-09-06 18:42:27 UTC
Attachment 223153 [details] pushed as dd99ea7 - Zero-pad track number in %dn pattern