patch by: Christophe Fergeau <cfergeau@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.
This commit is contained in:
20
ChangeLog
20
ChangeLog
@@ -1,3 +1,23 @@
|
||||
2012-04-01 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
patch by: Christophe Fergeau <cfergeau@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@redhat.com)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user