[SCM] morituri/master: patch by: Christophe Fergeau <cfergeau at redhat.com) * morituri/common/program.py: When morituri finds multiple matches for a given release, it only keeps the releases whose length are the closest to the CD being ripped. However, this currently interacts badly with the --release-id parameter because this duration filtering is done before trying to do the release-id matching. The release that the user has specified may have been removed from the potential matches by the time the release id match is tried. This commit removes the duration filtering when the user explicitly specified a release id. I've observed this bug with the first disc of The Wall (Experience Edition) by the Pink Floyd. Fixes #91.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:38 UTC 2014


The following commit has been merged in the master branch:
commit 9bf5892dbdb3f7a7e6c536a8bddcf3b748078f78
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Sun Apr 1 20:41:55 2012 +0000

    	patch by: Christophe Fergeau <cfergeau at redhat.com)
    	* morituri/common/program.py:
    	  When morituri finds multiple matches for a given release, it only
    	  keeps the releases whose length are the closest to the CD being
    	  ripped.
    	  However, this currently interacts badly with the --release-id
    	  parameter because this duration filtering is done before trying to
    	  do the release-id matching. The release that the user has specified
    	  may have been removed from the potential matches by the time the
    	  release
    	  id match is tried.
    	  This commit removes the duration filtering when the user explicitly
    	  specified a release id. I've observed this bug with the first disc
    	  of The Wall (Experience Edition) by the Pink Floyd.
    	  Fixes #91.

diff --git a/ChangeLog b/ChangeLog
index 82b2dc3..7be3d48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,26 @@
 	patch by: Christophe Fergeau <cfergeau at redhat.com)
 
 	* morituri/common/program.py:
+	  When morituri finds multiple matches for a given release, it only
+	  keeps the releases whose length are the closest to the CD being
+	  ripped.
+
+	  However, this currently interacts badly with the --release-id
+	  parameter because this duration filtering is done before trying to
+	  do the release-id matching. The release that the user has specified
+	  may have been removed from the potential matches by the time the
+	  release
+	  id match is tried.
+	  This commit removes the duration filtering when the user explicitly
+	  specified a release id. I've observed this bug with the first disc
+	  of The Wall (Experience Edition) by the Pink Floyd.
+	  Fixes #91.
+
+2012-04-01  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	patch by: Christophe Fergeau <cfergeau at redhat.com)
+
+	* morituri/common/program.py:
 	  When --release-id is used, we are not making guesses based on the
 	  CD lengths, so the message saying that we picked the closest match
 	  in duration, which can still trigger, is inappropriate.
diff --git a/morituri/common/program.py b/morituri/common/program.py
index f543b90..76e667a 100644
--- a/morituri/common/program.py
+++ b/morituri/common/program.py
@@ -267,12 +267,6 @@ class Program(log.Loggable):
                     deltas[delta] = []
                 deltas[delta].append(metadata)
 
-            # Select the release that most closely matches the duration.
-            lowest = min(deltas.keys())
-
-            # If we have multiple, make sure they match
-            metadatas = deltas[lowest]
-
             if release:
                 metadatas = [m for m in metadatas if m.url.endswith(release)]
                 self.debug('Asked for release %r, only kept %r',
@@ -285,6 +279,12 @@ class Program(log.Loggable):
                 elif not metadatas:
                     print 'Requested release id %s but none match' % release
                     return
+            else:
+                # Select the release that most closely matches the duration.
+                lowest = min(deltas.keys())
+
+                # If we have multiple, make sure they match
+                metadatas = deltas[lowest]
 
             if len(metadatas) > 1:
                 artist = metadatas[0].artist

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list