From 83d3dc0e6bc2a30ea452f513b912c50841fd8d6f Mon Sep 17 00:00:00 2001 From: Wieland Hoffmann Date: Sun, 9 Jun 2013 10:30:47 +0200 Subject: [PATCH] CAA: Correctly deal with images with no type set Those have an empty "types" list - we need to add a type because _caa_append_image_to_try_list expects one to be there. --- picard/coverart.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/picard/coverart.py b/picard/coverart.py index 6ca896650..40ad39237 100644 --- a/picard/coverart.py +++ b/picard/coverart.py @@ -128,8 +128,8 @@ def _caa_json_downloaded(album, metadata, release, try_list, data, http, error): for image in caa_data["images"]: if QObject.config.setting["caa_approved_only"] and not image["approved"]: continue - if not image["types"] and 'unknown' in caa_types: - _caa_append_image_to_trylist(try_list, image) + if not image["types"] and "unknown" in caa_types: + image["types"] = [u"Unknown"] imagetypes = map(unicode.lower, image["types"]) for imagetype in imagetypes: if imagetype == "front":