[SCM] morituri/master: * morituri/common/program.py: add release id to output. * morituri/rip/image.py: add --release-id to rip image retag. Fixes #96.
js at users.alioth.debian.org
js at users.alioth.debian.org
Sun Oct 19 20:09:50 UTC 2014
The following commit has been merged in the master branch:
commit 64fb8c9f14391a7372a6a858e979f111b1a49ed1
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date: Thu Dec 6 17:42:14 2012 +0000
* morituri/common/program.py:
add release id to output.
* morituri/rip/image.py:
add --release-id to rip image retag. Fixes #96.
diff --git a/ChangeLog b/ChangeLog
index 121c486..14244ca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
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:
Strip bitrate tags too for comparison of dicts.
Add a way to show us the different keys between dicts.
diff --git a/morituri/common/program.py b/morituri/common/program.py
index ddb6dc5..3befd2d 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.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:
diff --git a/morituri/rip/image.py b/morituri/rip/image.py
index 681ed6b..7038093 100644
--- a/morituri/rip/image.py
+++ b/morituri/rip/image.py
@@ -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'
--
morituri packaging
More information about the pkg-multimedia-commits
mailing list