mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
ae439f110e
commit
e35a7bd6fb
@ -1201,7 +1201,9 @@ class Cache(object):
|
||||
@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…
x
Reference in New Issue
Block a user