From ab2cf9d58b1c668f0861bf076f6582c9a3141c3a Mon Sep 17 00:00:00 2001 From: Vin Date: Tue, 17 Dec 2013 00:48:49 +0000 Subject: [PATCH] Changed insert_hashes to fit the new data format --- dejavu/database.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) mode change 100644 => 100755 dejavu/database.py diff --git a/dejavu/database.py b/dejavu/database.py old mode 100644 new mode 100755 index 018ddd4..78b1237 --- a/dejavu/database.py +++ b/dejavu/database.py @@ -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: