[SCM] morituri/master: * morituri/rip/cd.py: Clean up track numbering confusion.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:05 UTC 2014
The following commit has been merged in the master branch:
commit b3c2949066e0e19fb46643ac3bde337008aefcd8
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sun May 31 13:30:41 2009 +0000
* morituri/rip/cd.py:
Clean up track numbering confusion.
diff --git a/ChangeLog b/ChangeLog
index cc46b16..4f924fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py
index 260de6f..f6ab023 100644
--- a/morituri/rip/cd.py
+++ b/morituri/rip/cd.py
@@ -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)
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list