Fix album delete returning HTML instead of JSON for non-integer IDs

The DELETE /api/library/album/<id> route used <int:album_id> which
rejected non-integer IDs (e.g., Navidrome string IDs). Flask returned
its default 404 HTML page, causing "unexpected token <" JSON parse
error on the frontend. Changed to <album_id> to match all other
album routes which already accept any ID type.
This commit is contained in:
Broque Thomas 2026-03-27 15:00:41 -07:00
parent a928522b45
commit f94f043dc6

View file

@ -12474,7 +12474,7 @@ def library_delete_track(track_id):
return jsonify({"success": False, "error": str(e)}), 500
@app.route('/api/library/album/<int:album_id>', methods=['DELETE'])
@app.route('/api/library/album/<album_id>', methods=['DELETE'])
def library_delete_album(album_id):
"""Delete an album and all its tracks from the database (does NOT delete files on disk)."""
try: