Fix SoundCloud search #122

This commit is contained in:
nathom 2021-07-23 21:38:01 -07:00
parent 65aa1efc38
commit 5ab0fdbc4a
4 changed files with 23 additions and 10 deletions

View file

@ -68,7 +68,7 @@ class Database:
conditions = " AND ".join(f"{key}=?" for key in items.keys())
command = f"SELECT EXISTS(SELECT 1 FROM {self.name} WHERE {conditions})"
logger.debug(f"executing {command}")
logger.debug("Executing %s", command)
return bool(conn.execute(command, tuple(items.values())).fetchone()[0])
@ -108,7 +108,8 @@ class Database:
question_marks = ", ".join("?" for _ in items)
command = f"INSERT INTO {self.name} ({params}) VALUES ({question_marks})"
logger.debug(f"executing {command}")
logger.debug("Executing %s", command)
logger.debug("Items to add: %s", items)
with sqlite3.connect(self.path) as conn:
try: