[SCM] morituri/master: more variable shuffling
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:08 UTC 2014
The following commit has been merged in the master branch:
commit 644e67f1056024c75544500e4e48d9e80ea54f90
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Sun Jun 7 17:16:04 2009 +0000
more variable shuffling
diff --git a/README b/README
index dfd28a6..be78824 100644
--- a/README
+++ b/README
@@ -18,6 +18,7 @@ REQUIREMENTS
- cdparanoia, for the actual ripping
- cdrdao, for session, TOC, pregap, and ISRC extraction
- GStreamer, for encoding
+- python musicbrainz2, for metadata lookup
- pycdio, for drive identification (optional)
KNOWN ISSUES
diff --git a/morituri/common/program.py b/morituri/common/program.py
index 966b55a..e4b98e6 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -132,6 +132,7 @@ class Program(object):
cuePath = None
logPath = None
metadata = None
+ outdir = None
def __init__(self):
self.result = result.RipResult()
diff --git a/morituri/rip/cd.py b/morituri/rip/cd.py
index ae28330..6419544 100644
--- a/morituri/rip/cd.py
+++ b/morituri/rip/cd.py
@@ -130,9 +130,8 @@ class Rip(logcommand.LogCommand):
"full table's AR URL %s differs from toc AR URL %s" % (
itable.getAccurateRipURL(), ittoc.getAccurateRipURL())
- outdir = self.options.output_directory or os.getcwd()
+ prog.outdir = self.options.output_directory or os.getcwd()
profile = encode.PROFILES[self.options.profile]()
- extension = profile.extension
# result
prog.result.offset = int(self.options.offset)
@@ -147,12 +146,13 @@ class Rip(logcommand.LogCommand):
prog.result.vendor = 'Unknown'
prog.result.model = 'Unknown'
+ # FIXME: turn this into a method
def ripIfNotRipped(number):
trackResult = result.TrackResult()
prog.result.tracks.append(trackResult)
- path = prog.getPath(outdir, self.options.track_template,
- mbdiscid, number) + '.' + extension
+ path = prog.getPath(prog.outdir, self.options.track_template,
+ mbdiscid, number) + '.' + profile.extension
trackResult.number = number
trackResult.filename = path
if number > 0:
@@ -209,7 +209,7 @@ class Rip(logcommand.LogCommand):
ripIfNotRipped(i + 1)
### write disc files
- discName = prog.getPath(outdir, self.options.disc_template,
+ discName = prog.getPath(prog.outdir, self.options.disc_template,
mbdiscid, 0)
dirname = os.path.dirname(discName)
if not os.path.exists(dirname):
@@ -231,8 +231,8 @@ class Rip(logcommand.LogCommand):
if not track.audio:
continue
- path = prog.getPath(outdir, self.options.track_template,
- mbdiscid, i + 1) + '.' + extension
+ path = prog.getPath(prog.outdir, self.options.track_template,
+ mbdiscid, i + 1) + '.' + profile.extension
u = u'#EXTINF:%d,%s\n' % (
itable.getTrackLength(i + 1) / common.FRAMES_PER_SECOND,
os.path.basename(path))
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list