mirror of
https://github.com/correl/dejavu.git
synced 2024-12-29 19:15:03 +00:00
Changed insert_hashes to fit the new data format
This commit is contained in:
parent
9faf2cd591
commit
3bc507d8e4
1 changed files with 2 additions and 3 deletions
5
dejavu/database.py
Normal file → Executable file
5
dejavu/database.py
Normal file → Executable file
|
@ -260,14 +260,13 @@ class SQLDatabase(Database):
|
|||
"""
|
||||
return self.query(None)
|
||||
|
||||
def insert_hashes(self, hashes):
|
||||
def insert_hashes(self, sid, hashes):
|
||||
"""
|
||||
Insert series of hash => song_id, offset
|
||||
values into the database.
|
||||
"""
|
||||
# TODO: Fix this when hashes will be a new format.
|
||||
values = []
|
||||
for hash, (sid, offset) in hashes:
|
||||
for hash, offset in hashes:
|
||||
values.append((hash, sid, offset))
|
||||
|
||||
with self.cursor() as cur:
|
||||
|
|
Loading…
Reference in a new issue