mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix bug that would raise an exception when failing to read cover information from a LIT file
This commit is contained in:
parent
4bcec54057
commit
70ee94c9b8
@ -745,8 +745,7 @@ def get_metadata(stream):
|
||||
else:
|
||||
ext = ext.lower()
|
||||
cd = litfile.read_image(cover_item)
|
||||
if cd:
|
||||
mi.cover_data = (ext, cd)
|
||||
mi.cover_data = (ext, cd) if cd else (None, None)
|
||||
except:
|
||||
title = stream.name if hasattr(stream, 'name') and stream.name else 'Unknown'
|
||||
mi = MetaInformation(title, ['Unknown'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user