fix check_existence query param
This commit is contained in:
parent
c09f72803e
commit
fdab9b2878
@ -50,7 +50,7 @@ class Cache:
|
|||||||
logging.debug("Checking whether %s is already stored",
|
logging.debug("Checking whether %s is already stored",
|
||||||
artistsong.replace("\n", " - "))
|
artistsong.replace("\n", " - "))
|
||||||
check_query = "SELECT id FROM lyrics WHERE artistsong LIKE ? LIMIT 1"
|
check_query = "SELECT id FROM lyrics WHERE artistsong LIKE ? LIMIT 1"
|
||||||
params = (artistsong,)
|
params = (f"%{artistsong}%",)
|
||||||
async with sqlite3.connect(self.cache_db, timeout=2) as db_conn:
|
async with sqlite3.connect(self.cache_db, timeout=2) as db_conn:
|
||||||
async with db_conn.execute(check_query, params) as db_cursor:
|
async with db_conn.execute(check_query, params) as db_cursor:
|
||||||
result = await db_cursor.fetchone()
|
result = await db_cursor.fetchone()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user