From 405718870c428c05240b8ee000f4db91dec289a2 Mon Sep 17 00:00:00 2001 From: codey Date: Sun, 16 Feb 2025 20:57:13 -0500 Subject: [PATCH] minor --- endpoints/radio_util.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/endpoints/radio_util.py b/endpoints/radio_util.py index 1d9812d..5b82cdd 100644 --- a/endpoints/radio_util.py +++ b/endpoints/radio_util.py @@ -63,7 +63,8 @@ class RadioUtil: Returns: str """ - return str(datetime.timedelta(seconds=s)).split(".", maxsplit=1)[0] + return str(datetime.timedelta(seconds=s))\ + .split(".", maxsplit=1)[0] async def trackdb_typeahead(self, query: str) -> Optional[list[str]]: if not query: @@ -71,7 +72,7 @@ class RadioUtil: async with sqlite3.connect(self.active_playlist_path, timeout=1) as _db: _db.row_factory = sqlite3.Row - db_query: str = 'SELECT DISTINCT(artist || " - " || song) as artistsong FROM tracks WHERE\ + db_query: str = 'SELECT DISTINCT(LOWER(TRIM(artist) || " - " || TRIM(song))) as artistsong FROM tracks WHERE\ artistsong LIKE ? LIMIT 30' db_params: tuple[str] = (f"%{query}%",) async with _db.execute(db_query, db_params) as _cursor: