only try to download if we have a url
This commit is contained in:
parent
e623307d19
commit
debe3823e2
1 changed files with 8 additions and 6 deletions
|
@ -843,9 +843,11 @@ def download_cover(id):
|
|||
url = i.meta.get('cover')
|
||||
else:
|
||||
url = None
|
||||
cover = None
|
||||
|
||||
logger.debug('download cover %s %s', id, url)
|
||||
ratio = None
|
||||
if url:
|
||||
try:
|
||||
cover = ox.net.read_url(url)
|
||||
ratio = get_ratio(cover)
|
||||
|
|
Loading…
Reference in a new issue