mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-16 16:14:49 -04:00
Fix SoundCloud search #122
This commit is contained in:
parent
65aa1efc38
commit
5ab0fdbc4a
4 changed files with 23 additions and 10 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue