From 8e5b96059c4eaa36d8be6b4245d956feb6eb1b50 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Tue, 8 Apr 2014 11:29:35 -0700 Subject: [PATCH] Little bug fix to prevent opening up 'http://None' --- headphones/postprocessor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/headphones/postprocessor.py b/headphones/postprocessor.py index 860adb0b..993f09e2 100644 --- a/headphones/postprocessor.py +++ b/headphones/postprocessor.py @@ -360,7 +360,11 @@ def doPostProcessing(albumid, albumpath, release, tracks, downloaded_track_list, artwork = None album_art_path = albumart.getAlbumArt(albumid) if headphones.EMBED_ALBUM_ART or headphones.ADD_ALBUM_ART: - artwork = request.request_content(album_art_path) + + if album_art_path: + artwork = request.request_content(album_art_path) + else: + artwork = None if not album_art_path or not artwork or len(artwork) < 100: logger.info("No suitable album art found from Amazon. Checking Last.FM....")