musicfix

music file renamer and tagger
git clone git://git.2f30.org/musicfix
Log | Files | Refs | README | LICENSE

commit b95aa02fe8c40ef76bc5bf42fe8151aa079de141
parent 8a9ddca84edf1f71db93070d3e6f8f80f2f7399a
Author: lostd <lostd@2f30.org>
Date:   Tue, 14 Aug 2012 10:39:29 +0000

Fix handling of single track per side vinyls

Diffstat:
Mbin/musicfix | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/bin/musicfix b/bin/musicfix @@ -55,6 +55,7 @@ def mkartist al end # Convert "3" to (nil, "03") +# Convert "A" to (nil, "A0") # Convert "A3" to (nil, "A3") # Convert "2.3" to ("2", "03") # Convert "2.03" to ("2", "03") @@ -68,7 +69,11 @@ def mkdiscnum pos else d = d.gsub /\D/, '' end - n = n.rjust(2, '0') + if n.match /[A-Z]/ + n = n.ljust(2, '0') + else + n = n.rjust(2, '0') + end return d, n end