mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cleaner viewer launch
This commit is contained in:
parent
5e611db7db
commit
205754891e
@ -120,8 +120,8 @@ def prepare_convert(temp_path, key, st):
|
||||
|
||||
def do_convert(path, temp_path, key, instance):
|
||||
tdir = os.path.join(temp_path, instance['path'])
|
||||
fork_job('calibre.srv.render_book', 'render', args=(
|
||||
path, tdir, {'size': instance['file_size'], 'mtime': instance['file_mtime'], 'hash': key}, True, True, False,
|
||||
fork_job('calibre.srv.render_book', 'render_for_viewer', args=(
|
||||
path, tdir, {'size': instance['file_size'], 'mtime': instance['file_mtime'], 'hash': key},
|
||||
), timeout=3000, no_output=True
|
||||
)
|
||||
size = 0
|
||||
|
@ -709,5 +709,12 @@ def render(pathtoebook, output_dir, book_hash=None, serialize_metadata=False, ex
|
||||
f.write(annotations)
|
||||
|
||||
|
||||
def render_for_viewer(path, out_dir, book_hash):
|
||||
return render(
|
||||
path, out_dir, book_hash=book_hash, serialize_metadata=True,
|
||||
extract_annotations=True, virtualize_resources=False
|
||||
)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
render(sys.argv[-2], sys.argv[-1], serialize_metadata=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user