From 915b77fe19ba73b803ad152609a69ef94ba2e012 Mon Sep 17 00:00:00 2001 From: codey Date: Wed, 15 Jan 2025 20:21:19 -0500 Subject: [PATCH] break lines/cleanup --- lyric_search_new/sources/cache.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lyric_search_new/sources/cache.py b/lyric_search_new/sources/cache.py index 6b302c1..e207a5f 100644 --- a/lyric_search_new/sources/cache.py +++ b/lyric_search_new/sources/cache.py @@ -85,7 +85,8 @@ class Cache: lyrics = regex.sub(r'(
|\n|\r\n)', ' / ', lyr_result.lyrics.strip()) lyrics = regex.sub(r'\s{2,}', ' ', lyrics) - insert_query = "INSERT INTO lyrics (src, date_retrieved, artist, song, artistsong, confidence, lyrics) VALUES(?, ?, ?, ?, ?, ?, ?)" + insert_query = "INSERT INTO lyrics (src, date_retrieved, artist, song, artistsong, confidence, lyrics)\ + VALUES(?, ?, ?, ?, ?, ?, ?)" params = (lyr_result.src, time.time(), lyr_result.artist, lyr_result.song, artistsong, lyr_result.confidence, lyrics) @@ -128,7 +129,8 @@ class Cache: f"{artist.strip()} {song.strip()}") if artist == "!" and song == "!": random_search: bool = True - search_query: str = 'SELECT id, artist, song, lyrics, src, confidence FROM lyrics ORDER BY RANDOM() LIMIT 1' + search_query: str = 'SELECT id, artist, song, lyrics, src, confidence\ + FROM lyrics ORDER BY RANDOM() LIMIT 1' search_params = None async with await _db_cursor.execute(search_query, search_params) as db_cursor: results: list = await db_cursor.fetchall()