fix icon fallback

This commit is contained in:
j 2014-05-27 11:59:23 +02:00
parent 7e7478be30
commit 8279a55785

View file

@ -98,11 +98,12 @@ def get_icon(app, id, type_, size, callback):
callback(str(data)) callback(str(data))
return return
key = '%s:%s' % (type_, id) key = '%s:%s' % (type_, id)
if not icons[key]: data = icons[key]
if not data:
type_ = 'preview' if type_ == 'cover' else 'cover' type_ = 'preview' if type_ == 'cover' else 'cover'
key = '%s:%s' % (type_, id)
if size: if size:
skey = '%s:%s:%s' % (type_, id, size) skey = '%s:%s:%s' % (type_, id, size)
data = None
if size: if size:
data = icons[skey] data = icons[skey]
if data: if data: