convert track_id --> trackid

This commit is contained in:
geoffrey45
2022-02-23 02:46:06 +03:00
parent 2e699f7be7
commit fe07961757
9 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -286,13 +286,13 @@ def get_album_bio(title, artist):
return {"bio": bio}, 200
@bp.route("/file/<track_id>")
def send_track_file(track_id):
@bp.route("/file/<trackid>")
def send_track_file(trackid):
"""
Returns an audio file that matches the passed id to the client.
"""
try:
filepath = instances.songs_instance.get_song_by_id(track_id)['filepath']
filepath = instances.songs_instance.get_song_by_id(trackid)['filepath']
return send_file(filepath, mimetype="audio/mp3")
except FileNotFoundError:
return "File not found", 404