Fix fanart.tv fallback to English not working

- Fixes #63
This commit is contained in:
tomkat83 2016-06-19 15:34:27 +02:00
parent f3881bb415
commit 792d4debeb

View file

@ -2125,7 +2125,8 @@ class API():
allartworks[fanarttype[1]] = entry.get("url") allartworks[fanarttype[1]] = entry.get("url")
break break
# just grab the first english OR undefinded one as fallback # just grab the first english OR undefinded one as fallback
if allartworks.get(fanarttype[1]) is None: # (so we're actually grabbing the more popular one)
if not allartworks.get(fanarttype[1]):
for entry in data[fanarttvimage]: for entry in data[fanarttvimage]:
if entry.get("lang") in ("en", "00"): if entry.get("lang") in ("en", "00"):
allartworks[fanarttype[1]] = entry.get("url") allartworks[fanarttype[1]] = entry.get("url")