diff --git a/endpoints/lyric_search.py b/endpoints/lyric_search.py index 58a29b3..ae1e301 100644 --- a/endpoints/lyric_search.py +++ b/endpoints/lyric_search.py @@ -90,7 +90,7 @@ class LyricSearch(FastAPI): }) query: str = data.query typeahead_result: list[dict] = await self.cache_utils.check_typeahead(query) - typeahead_list: list[str] = [str(r.get('artist')) for r in typeahead_result] + typeahead_list: list[str] = [str(r['artist']) for r in typeahead_result] return JSONResponse(content=typeahead_list) async def song_typeahead_handler(self, data: ValidTypeAheadRequest) -> JSONResponse: @@ -183,7 +183,7 @@ class LyricSearch(FastAPI): }) result['lyrics'] = " / ".join(lyric_lines[seeked_found_line:]) - result['confidence'] = int(result.get('confidence', 0)) + result['confidence'] = int(result['confidence']) result['time'] = f'{float(result['time']):.4f}' if plain_lyrics: diff --git a/endpoints/misc.py b/endpoints/misc.py index a55fbd3..ea74262 100644 --- a/endpoints/misc.py +++ b/endpoints/misc.py @@ -87,7 +87,6 @@ class Misc(FastAPI): 'err': True, 'errorText': 'General failure.', } - logging.info("Found: %s", found_counts) return found_counts async def homepage_radio_widget(self) -> JSONResponse: