mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 23:43:44 +02:00
Fix #25 (bugfix: pass book_id to FileType plugins on postimport instead of __builtins__.id())
This commit is contained in:
parent
6af87c05e3
commit
e83738653c
1 changed files with 3 additions and 2 deletions
|
|
@ -1500,8 +1500,9 @@ def add_format_with_hooks(self, index, format, fpath, index_is_id=False,
|
|||
format = os.path.splitext(npath)[-1].lower().replace('.', '').upper()
|
||||
stream = lopen(npath, 'rb')
|
||||
format = check_ebook_format(stream, format)
|
||||
retval = self.add_format(index, format, stream, replace=replace,
|
||||
index_is_id=index_is_id, path=path, notify=notify)
|
||||
id = index if index_is_id else self.id(index)
|
||||
retval = self.add_format(id, format, stream, replace=replace,
|
||||
index_is_id=True, path=path, notify=notify)
|
||||
run_plugins_on_postimport(self, id, format)
|
||||
return retval
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue