mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 14:04:12 +02:00
...
This commit is contained in:
parent
ae439f110e
commit
e35a7bd6fb
1 changed files with 3 additions and 1 deletions
|
|
@ -1201,7 +1201,9 @@ def protected_set_field(name, val, **kwargs):
|
|||
@api
|
||||
def add_format(self, book_id, fmt, stream_or_path, replace=True, run_hooks=True, dbapi=None):
|
||||
if run_hooks:
|
||||
# Run import plugins
|
||||
# Run import plugins, the write lock is not held to cater for
|
||||
# broken plugins that might spin the event loop by popping up a
|
||||
# message in the GUI during the processing.
|
||||
npath = run_import_plugins(stream_or_path, fmt)
|
||||
fmt = os.path.splitext(npath)[-1].lower().replace('.', '').upper()
|
||||
stream_or_path = lopen(npath, 'rb')
|
||||
|
|
|
|||
Loading…
Reference in a new issue