mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-22 23:05:53 +01:00
Detect when format has changed during import
This commit is contained in:
parent
fc924d5fc6
commit
ccfa34c9ec
1 changed files with 2 additions and 0 deletions
|
|
@ -44,6 +44,8 @@ def book(db, notify_changes, is_remote, args):
|
|||
else:
|
||||
path = data
|
||||
path = run_import_plugins([path])[0]
|
||||
fmt = os.path.splitext(path)[1]
|
||||
fmt = fmt[1:] if fmt else None
|
||||
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