mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-04 12:33:03 +00:00
send processing album colors to a background thread
- use white color as default album page play button color - return 404 if album is None on get_album_bio()
This commit is contained in:
committed by
Mungai Geoffrey
parent
34a214df22
commit
77a5d2b7c2
@@ -80,12 +80,17 @@ def get_album_bio():
|
||||
"""Returns the album bio for the given album."""
|
||||
data = request.get_json()
|
||||
album_hash = data["hash"]
|
||||
err_msg = {"bio": "No bio found"}
|
||||
|
||||
album = instances.album_instance.find_album_by_hash(album_hash)
|
||||
|
||||
if album is None:
|
||||
return err_msg, 404
|
||||
|
||||
bio = FetchAlbumBio(album["title"], album["artist"])()
|
||||
|
||||
if bio is None:
|
||||
return {"bio": "No bio found."}, 404
|
||||
return err_msg, 404
|
||||
|
||||
return {"bio": bio}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user