From be4dc227fcdb1a6ace32b5d29e67d4a688b7f690 Mon Sep 17 00:00:00 2001 From: Lars Kruse Date: Tue, 24 May 2016 03:05:51 +0200 Subject: [PATCH] web: handle missing art gracefully --- beetsplug/web/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/beetsplug/web/__init__.py b/beetsplug/web/__init__.py index ede4658a2..0cddc8746 100644 --- a/beetsplug/web/__init__.py +++ b/beetsplug/web/__init__.py @@ -218,7 +218,10 @@ def album_query(queries): @app.route('/album//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.