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:
|
||||
args.append(name)
|
||||
if open_at is not None:
|
||||
args.append('--open-at=' + open_at)
|
||||
if calibre_book_data is not None:
|
||||
with PersistentTemporaryFile('.json') as ptf:
|
||||
ptf.write(as_bytes(json.dumps(calibre_book_data)))
|
||||
args.append('--internal-book-data=' + ptf.name)
|
||||
if viewer != 'lrfviewer':
|
||||
if open_at is not None:
|
||||
args.append('--open-at=' + open_at)
|
||||
if calibre_book_data is not None:
|
||||
with PersistentTemporaryFile('.json') as ptf:
|
||||
ptf.write(as_bytes(json.dumps(calibre_book_data)))
|
||||
args.append('--internal-book-data=' + ptf.name)
|
||||
self.gui.job_manager.launch_gui_app(viewer,
|
||||
kwargs=dict(args=args))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user