cover fallback

This commit is contained in:
j 2019-02-01 18:46:07 +05:30
parent 106ae904c3
commit 7ab27db0dd

View file

@ -837,13 +837,13 @@ def update_sort_table():
def download_cover(id): def download_cover(id):
key = 'cover:%s' % id key = 'cover:%s' % id
cover = None
with db.session(): with db.session():
i = Item.get(id) i = Item.get(id)
if i: if i:
url = i.meta.get('cover') url = i.meta.get('cover')
else: else:
url = None url = None
cover = None
logger.debug('download cover %s %s', id, url) logger.debug('download cover %s %s', id, url)
ratio = None ratio = None