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
|
data['size'] = os.stat(f).st_size
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if ext == 'cbr':
|
if ext in ('cbr', 'cbz'):
|
||||||
info = cbr.info(f)
|
info = cbr.info(f)
|
||||||
elif ext in ('epub', 'kepub'):
|
elif ext in ('epub', 'kepub'):
|
||||||
info = epub.info(f)
|
info = epub.info(f)
|
||||||
|
@ -43,6 +43,9 @@ def metadata(f, from_=None):
|
||||||
info = pdf.info(f)
|
info = pdf.info(f)
|
||||||
elif ext == 'txt':
|
elif ext == 'txt':
|
||||||
info = txt.info(f)
|
info = txt.info(f)
|
||||||
|
else:
|
||||||
|
logger.error('unknown extension %s', f, ext)
|
||||||
|
info = {}
|
||||||
except:
|
except:
|
||||||
logger.debug('failed to load %s info from %s', ext, f, exc_info=True)
|
logger.debug('failed to load %s info from %s', ext, f, exc_info=True)
|
||||||
info = {}
|
info = {}
|
||||||
|
|
Loading…
Reference in a new issue