mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix viewing LRF files not working. Fixes #1970391 [LRF books cannot be viewed](https://bugs.launchpad.net/calibre/+bug/1970391)
This commit is contained in:
parent
fde3f7bbb0
commit
3a83e75401
@ -168,12 +168,13 @@ class ViewAction(InterfaceAction):
|
|||||||
|
|
||||||
if name is not None:
|
if name is not None:
|
||||||
args.append(name)
|
args.append(name)
|
||||||
if open_at is not None:
|
if viewer != 'lrfviewer':
|
||||||
args.append('--open-at=' + open_at)
|
if open_at is not None:
|
||||||
if calibre_book_data is not None:
|
args.append('--open-at=' + open_at)
|
||||||
with PersistentTemporaryFile('.json') as ptf:
|
if calibre_book_data is not None:
|
||||||
ptf.write(as_bytes(json.dumps(calibre_book_data)))
|
with PersistentTemporaryFile('.json') as ptf:
|
||||||
args.append('--internal-book-data=' + ptf.name)
|
ptf.write(as_bytes(json.dumps(calibre_book_data)))
|
||||||
|
args.append('--internal-book-data=' + ptf.name)
|
||||||
self.gui.job_manager.launch_gui_app(viewer,
|
self.gui.job_manager.launch_gui_app(viewer,
|
||||||
kwargs=dict(args=args))
|
kwargs=dict(args=args))
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user