From 25bf97e813fc28001e0a45d4768608f81d036bb2 Mon Sep 17 00:00:00 2001 From: Vin Date: Tue, 17 Dec 2013 16:37:06 +0000 Subject: [PATCH] Changed a method to fit the new hash tuples --- dejavu/database.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/dejavu/database.py b/dejavu/database.py index a08bfcd..5d0222f 100755 --- a/dejavu/database.py +++ b/dejavu/database.py @@ -277,15 +277,11 @@ class SQLDatabase(Database): def return_matches(self, hashes): """ Return the (song_id, offset_diff) tuples associated with - a list of - - sha1 => (None, sample_offset) - - values. + a list of (sha1, sample_offset) values. """ # Create a dictionary of hash => offset pairs for later lookups mapper = {} - for hash, (_, offset) in hashes: + for hash, offset in hashes: mapper[hash.upper()] = offset # Get an iteratable of all the hashes we need