mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
Fix error codes for missing album and lyrics
This commit is contained in:
+2
-2
@@ -44,7 +44,7 @@ def get_album_tracks_and_info():
|
||||
album = AlbumStore.get_album_by_hash(albumhash)
|
||||
|
||||
if album is None:
|
||||
return error_msg, 204
|
||||
return error_msg, 404
|
||||
|
||||
tracks = TrackStore.get_tracks_by_albumhash(albumhash)
|
||||
|
||||
@@ -52,7 +52,7 @@ def get_album_tracks_and_info():
|
||||
return error_msg, 404
|
||||
|
||||
if len(tracks) == 0:
|
||||
return error_msg, 204
|
||||
return error_msg, 404
|
||||
|
||||
def get_album_genres(tracks: list[Track]):
|
||||
genres = set()
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ def send_lyrics():
|
||||
lyrics, is_synced, copyright = get_lyrics_from_tags(filepath)
|
||||
|
||||
if not lyrics:
|
||||
return {"error": "No lyrics found"}, 204
|
||||
return {"error": "No lyrics found"}, 404
|
||||
|
||||
return {"lyrics": lyrics, "synced": is_synced, "copyright": copyright}, 200
|
||||
|
||||
|
||||
Reference in New Issue
Block a user