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 753739 - zero-pad disc number in filename
zero-pad disc number in filename
Status: RESOLVED FIXED
Product: sound-juicer
Classification: Applications
Component: interface
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: Sound Juicer Maintainers
Sound Juicer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-08-18 01:49 UTC by Ross Grady
Modified: 2015-09-01 10:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Zero pad disc number when needed (1.51 KB, patch)
2015-08-25 10:07 UTC, Phillip Wood
committed Details | Review

Description Ross Grady 2015-08-18 01:49:34 UTC
I just ripped a 15-CD set. In the Sound-Juicer UI I made a point of setting the disc number to zero-padded for the first 9 discs in the set, so that the filename would include a zero-padded disc number.

I use the stock Number-Track Artist-Track Title (lowercase) filename template.

With this template I get the disc number included in the filename, but it's not zero-padded, so it sorts discs 10-15 before disc 1 when I do an ls. This unfortunately also means that my music player of choice, MOC, sorts in that order as well.

I have no problem with Sound-Juicer defaulting to single-digit disc numbers, but if I manually input the zero padding it would be really cool if it would respect that.

Note that I'm on 3.4 because I'm on Ubuntu 12.04 for at least the next little while. I attempted to skim through bug reports & commit messages to see if this had already been addressed in a later release, but I didn't see anything.

Thanks!
Comment 1 Phillip Wood 2015-08-24 10:43:38 UTC
(In reply to Ross Grady from comment #0)
Thanks for taking the time to report this issue, sorry for the slow reply.

> I just ripped a 15-CD set. In the Sound-Juicer UI I made a point of setting
> the disc number to zero-padded for the first 9 discs in the set, so that the
> filename would include a zero-padded disc number.

Sound Juicer treats the disc number you enter in the UI as an integer so it discards any leading zeros, I think this make sense in most cases - we should automatically format the disc number according to the total number of discs. I keep meaning to add a way of specifying the total number of discs in the UI for albums that are not in MusicBraniz.

> I use the stock Number-Track Artist-Track Title (lowercase) filename
> template.

I'm going to change this template so that it looks at the total number of discs in the album and formats the disc number appropriately. This will work for albums in MusicBrainz but not others until I add a way to enter the total number of discs in the UI.

> Note that I'm on 3.4 because I'm on Ubuntu 12.04 for at least the next
> little while. I attempted to skim through bug reports & commit messages to
> see if this had already been addressed in a later release, but I didn't see
> anything.

Thanks for checking, you're right it hasn't been addressed yet. The initial fix is simple, I'll try and push it this week.
Comment 2 Phillip Wood 2015-08-25 10:07:46 UTC
Created attachment 309947 [details] [review]
Zero pad disc number when needed

Zero pad the disc number appropriately for the number of discs in the
current album. This means that the tracks will sort properly when listed
alphabetically by name. Currently there is no way to enter the number of
discs in the current album in the UI so this only works for albums that
have that information in MusicBrainz.
Comment 3 Phillip Wood 2015-09-01 10:04:42 UTC
Attachment 309947 [details] pushed as 6bd1ea3 - Zero pad disc number when needed