fix cbz import
This commit is contained in:
parent
84259fb0c4
commit
a9d33dd2d8
1 changed files with 4 additions and 1 deletions
|
@ -34,7 +34,7 @@ def metadata(f, from_=None):
|
|||
data['size'] = os.stat(f).st_size
|
||||
|
||||
try:
|
||||
if ext == 'cbr':
|
||||
if ext in ('cbr', 'cbz'):
|
||||
info = cbr.info(f)
|
||||
elif ext in ('epub', 'kepub'):
|
||||
info = epub.info(f)
|
||||
|
@ -43,6 +43,9 @@ def metadata(f, from_=None):
|
|||
info = pdf.info(f)
|
||||
elif ext == 'txt':
|
||||
info = txt.info(f)
|
||||
else:
|
||||
logger.error('unknown extension %s', f, ext)
|
||||
info = {}
|
||||
except:
|
||||
logger.debug('failed to load %s info from %s', ext, f, exc_info=True)
|
||||
info = {}
|
||||
|
|
Loading…
Reference in a new issue