* morituri/rip/cd.py:

Clean up track numbering confusion.
This commit is contained in:
Thomas Vander Stichele
2009-05-31 13:30:41 +00:00
parent 7e13909382
commit b3c2949066
2 changed files with 9 additions and 4 deletions

View File

@@ -1,3 +1,8 @@
2009-05-31 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/rip/cd.py:
Clean up track numbering confusion.
2009-05-26 Thomas Vander Stichele <thomas at apestaart dot org>
* morituri/common/encode.py (added):

View File

@@ -137,7 +137,7 @@ def getPath(outdir, template, metadata, i):
v = {}
v['t'] = '%02d' % (i + 1)
v['t'] = '%02d' % i
# default values
v['A'] = 'Unknown Artist'
@@ -149,7 +149,7 @@ def getPath(outdir, template, metadata, i):
if metadata:
v['A'] = filterForPath(metadata.artist)
v['d'] = filterForPath(metadata.title)
if i >= 0:
if i > 0:
try:
v['a'] = filterForPath(metadata.tracks[i - 1].artist)
v['n'] = filterForPath(metadata.tracks[i - 1].title)
@@ -264,7 +264,7 @@ class Rip(logcommand.LogCommand):
print 'Found Hidden Track One Audio from frame %d to %d' % (start, stop)
# rip it
htoapath = getPath(outdir, self.options.track_template, metadata, -1) + '.wav'
htoapath = getPath(outdir, self.options.track_template, metadata, 0) + '.wav'
dirname = os.path.dirname(htoapath)
if not os.path.exists(dirname):
os.makedirs(dirname)
@@ -292,7 +292,7 @@ class Rip(logcommand.LogCommand):
track.indexes[1].relative = 0
continue
path = getPath(outdir, self.options.track_template, metadata, i) + '.wav'
path = getPath(outdir, self.options.track_template, metadata, i + 1) + '.wav'
dirname = os.path.dirname(path)
if not os.path.exists(dirname):
os.makedirs(dirname)