* morituri/common/program.py:
add release id to output. * morituri/rip/image.py: add --release-id to rip image retag. Fixes #96.
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
2012-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/common/program.py:
|
||||
add release id to output.
|
||||
* morituri/rip/image.py:
|
||||
add --release-id to rip image retag. Fixes #96.
|
||||
|
||||
2012-12-06 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* morituri/common/common.py:
|
||||
|
||||
@@ -241,10 +241,11 @@ class Program(log.Loggable):
|
||||
self._stdout.write('Continuing without metadata\n')
|
||||
|
||||
if metadatas:
|
||||
self._stdout.write('\nMatching releases:\n')
|
||||
deltas = {}
|
||||
for metadata in metadatas:
|
||||
|
||||
self._stdout.write('\nMatching releases:\n')
|
||||
|
||||
for metadata in metadatas:
|
||||
self._stdout.write('Artist : %s\n' %
|
||||
metadata.artist.encode('utf-8'))
|
||||
self._stdout.write('Title : %s\n' %
|
||||
@@ -252,6 +253,7 @@ class Program(log.Loggable):
|
||||
self._stdout.write('Duration: %s\n' %
|
||||
common.formatTime(metadata.duration / 1000.0))
|
||||
self._stdout.write('URL : %s\n' % metadata.url)
|
||||
self._stdout.write('Release : %s\n' % metadata.mbid)
|
||||
|
||||
delta = abs(metadata.duration - ittoc.duration())
|
||||
if not delta in deltas:
|
||||
|
||||
@@ -103,6 +103,12 @@ class Retag(logcommand.LogCommand):
|
||||
|
||||
summary = "retag image files"
|
||||
|
||||
def addOptions(self):
|
||||
self.parser.add_option('-R', '--release-id',
|
||||
action="store", dest="release_id",
|
||||
help="MusicBrainz release id to match to (if there are multiple)")
|
||||
|
||||
|
||||
def do(self, args):
|
||||
prog = program.Program(stdout=self.stdout)
|
||||
runner = task.SyncRunner()
|
||||
@@ -114,7 +120,8 @@ class Retag(logcommand.LogCommand):
|
||||
cueImage.setup(runner)
|
||||
|
||||
mbdiscid = cueImage.table.getMusicBrainzDiscId()
|
||||
prog.metadata = prog.getMusicBrainz(cueImage.table, mbdiscid)
|
||||
prog.metadata = prog.getMusicBrainz(cueImage.table, mbdiscid,
|
||||
release=self.options.release_id)
|
||||
|
||||
if not prog.metadata:
|
||||
print 'Not in MusicBrainz database, skipping'
|
||||
|
||||
Reference in New Issue
Block a user