mirror of
https://github.com/correl/dejavu.git
synced 2024-11-23 11:09:52 +00:00
Changed a method to fit the new hash tuples
This commit is contained in:
parent
776995e454
commit
25bf97e813
1 changed files with 2 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue