mirror of
https://github.com/beetbox/beets.git
synced 2025-12-09 18:12:19 +01:00
web: handle missing art gracefully
This commit is contained in:
parent
26cdbb0f7b
commit
be4dc227fc
1 changed files with 4 additions and 1 deletions
|
|
@ -218,7 +218,10 @@ def album_query(queries):
|
|||
@app.route('/album/<int:album_id>/art')
|
||||
def album_art(album_id):
|
||||
album = g.lib.get_album(album_id)
|
||||
return flask.send_file(album.artpath)
|
||||
if album.artpath:
|
||||
return flask.send_file(album.artpath)
|
||||
else:
|
||||
return flask.abort(404)
|
||||
|
||||
|
||||
# Artists.
|
||||
|
|
|
|||
Loading…
Reference in a new issue