added `subprocess.wait()` when getting metadata

This commit is contained in:
Thore Schillmann 2022-07-07 11:47:10 +00:00
parent fc004f4f0c
commit 4913673e8f
1 changed files with 1 additions and 0 deletions

View File

@ -241,6 +241,7 @@ class TaskConvert(CalibreTask):
calibredb_binarypath = os.path.join(config.config_binariesdir, SUPPORTED_CALIBRE_BINARIES["calibredb"])
opf_command = [calibredb_binarypath, 'show_metadata', '--as-opf', str(book_id), '--with-library', config.config_calibre_dir]
p = process_open(opf_command, quotes)
p.wait()
path_tmp_opf = os.path.join(tmp_dir, "metadata_" + str(current_milli_time()) + ".opf")
with open(path_tmp_opf, 'w') as fd:
copyfileobj(p.stdout, fd)