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.
This commit is contained in:
Wieland Hoffmann
2013-06-09 10:30:47 +02:00
parent 63b241e053
commit 83d3dc0e6b

View File

@@ -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":