Feature Request: Zero-padded track numbers

I wish MOC could show the track numbers from the flac/mp3/ogg tags as

07 title ...
08 title ...
09 title ...
10 title ...
11 title ...
12 title ...

rather than

7 title ...
8 title ...
9 title ...
10 title ...
11 title ...
12 title ...

It would be nice to add a setting in the config file for this.

I agree, that would be very nice. Playlist would look more elegant ;)

I attach a trivial patch to "fix" this aesthetic issue.

<br /> --- moc-2.5.0-alpha4/playlist.c 2010-12-23 11:22:10.100000068 +0100<br /> +++ moc-2.5.0-alpha4/playlist.c 2010-12-23 11:29:25.724000069 +0100<br /> @@ -462,7 +462,7 @@<br /> switch (fmt) {<br /> case 'n':<br /> if (tags-&gt;track != -1) {<br /> - snprintf (track, sizeof(track), "%d", tags-&gt;track);<br /> + snprintf (track, sizeof(track), "%02d", tags-&gt;track);<br /> return track;<br /> }<br /> return NULL;<br />

This assumes that the max track number on a disk is 99, just like in audiocd, I am no expert in multimedia so I don't know if there's really anything else that needs to be taken into account. In any case this is a trivial fix that works for me.