cleanup/refactor
This commit is contained in:
@ -143,8 +143,10 @@ class Radio(FastAPI):
|
||||
Otherwise, current track album art will be pulled.
|
||||
"""
|
||||
try:
|
||||
if not track_id:
|
||||
track_id = self.radio_util.now_playing.get('id')
|
||||
logging.debug("Seeking album art with trackId: %s", track_id)
|
||||
album_art: Optional[bytes] = await self.radio_util._get_album_art(track_id=track_id)
|
||||
album_art: Optional[bytes] = await self.radio_util.get_album_art(track_id=track_id)
|
||||
if not album_art:
|
||||
return RedirectResponse(url="https://codey.lol/images/radio_art_default.jpg",
|
||||
status_code=302)
|
||||
@ -205,7 +207,7 @@ class Radio(FastAPI):
|
||||
traceback.print_exc()
|
||||
try:
|
||||
if not await self.radio_util.get_album_art(file_path=next['file_path']):
|
||||
album_art = await self.radio_util._get_album_art(next['file_path'])
|
||||
album_art = await self.radio_util.get_album_art(file_path=next['file_path'])
|
||||
await self.radio_util.cache_album_art(next['id'], album_art)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
|
Reference in New Issue
Block a user