mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 21:33:48 +02:00
Add a UNKNOWN format if an input plugin results in a file without an extension
This commit is contained in:
parent
1ebbd21264
commit
5d8ad82758
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ def book(db, notify_changes, is_remote, args):
|
|||
path = data
|
||||
path = run_import_plugins([path])[0]
|
||||
fmt = os.path.splitext(path)[1]
|
||||
fmt = fmt[1:] if fmt else None
|
||||
fmt = (fmt[1:] if fmt else None) or 'unknown'
|
||||
with lopen(path, 'rb') as stream:
|
||||
mi = get_metadata(stream, stream_type=fmt, use_libprs_metadata=True)
|
||||
if not mi.title:
|
||||
|
|
|
|||
Loading…
Reference in a new issue