cover url can fail
This commit is contained in:
parent
fe7769a7ba
commit
5024414ed6
1 changed files with 5 additions and 1 deletions
|
@ -321,7 +321,11 @@ class Item(db.Model):
|
||||||
key = 'cover:%s'%self.id
|
key = 'cover:%s'%self.id
|
||||||
cover = None
|
cover = None
|
||||||
if 'cover' in self.meta and self.meta['cover']:
|
if 'cover' in self.meta and self.meta['cover']:
|
||||||
|
try:
|
||||||
cover = ox.cache.read_url(self.meta['cover'])
|
cover = ox.cache.read_url(self.meta['cover'])
|
||||||
|
except:
|
||||||
|
logger.debug('unable to read cover url %s', self.meta['cover'])
|
||||||
|
cover = None
|
||||||
if cover:
|
if cover:
|
||||||
icons[key] = cover
|
icons[key] = cover
|
||||||
self.info['coverRatio'] = get_ratio(cover)
|
self.info['coverRatio'] = get_ratio(cover)
|
||||||
|
|
Loading…
Reference in a new issue