mirror of
https://github.com/correl/dejavu.git
synced 2024-11-23 19:19:53 +00:00
Changed insert_hashes to fit the new data format
This commit is contained in:
parent
0bd7219b87
commit
ab2cf9d58b
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)
|
return self.query(None)
|
||||||
|
|
||||||
def insert_hashes(self, hashes):
|
def insert_hashes(self, sid, hashes):
|
||||||
"""
|
"""
|
||||||
Insert series of hash => song_id, offset
|
Insert series of hash => song_id, offset
|
||||||
values into the database.
|
values into the database.
|
||||||
"""
|
"""
|
||||||
# TODO: Fix this when hashes will be a new format.
|
|
||||||
values = []
|
values = []
|
||||||
for hash, (sid, offset) in hashes:
|
for hash, offset in hashes:
|
||||||
values.append((hash, sid, offset))
|
values.append((hash, sid, offset))
|
||||||
|
|
||||||
with self.cursor() as cur:
|
with self.cursor() as cur:
|
||||||
|
|
Loading…
Reference in a new issue