mirror of
https://github.com/correl/dejavu.git
synced 2024-11-23 19:19:53 +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):
|
def return_matches(self, hashes):
|
||||||
"""
|
"""
|
||||||
Return the (song_id, offset_diff) tuples associated with
|
Return the (song_id, offset_diff) tuples associated with
|
||||||
a list of
|
a list of (sha1, sample_offset) values.
|
||||||
|
|
||||||
sha1 => (None, sample_offset)
|
|
||||||
|
|
||||||
values.
|
|
||||||
"""
|
"""
|
||||||
# Create a dictionary of hash => offset pairs for later lookups
|
# Create a dictionary of hash => offset pairs for later lookups
|
||||||
mapper = {}
|
mapper = {}
|
||||||
for hash, (_, offset) in hashes:
|
for hash, offset in hashes:
|
||||||
mapper[hash.upper()] = offset
|
mapper[hash.upper()] = offset
|
||||||
|
|
||||||
# Get an iteratable of all the hashes we need
|
# Get an iteratable of all the hashes we need
|
||||||
|
|
Loading…
Reference in a new issue