cleanup/fix artist_typeahead_handler

This commit is contained in:
codey 2025-02-16 07:49:10 -05:00
parent b15fab98b8
commit e67d2874e4
2 changed files with 2 additions and 3 deletions

View File

@ -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:

View File

@ -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: