1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-11-01 15:53:01 +00:00

Merge branch 'master' into Develop

# Conflicts:
#	cps/helper.py
This commit is contained in:
Ozzie Isaacs
2024-02-24 14:51:53 +01:00
69 changed files with 7639 additions and 6498 deletions

View File

@@ -252,9 +252,16 @@ class TaskConvert(CalibreTask):
quotes = [3, 5]
tmp_dir = get_temp_dir()
calibredb_binarypath = os.path.join(config.config_binariesdir, SUPPORTED_CALIBRE_BINARIES["calibredb"])
my_env = os.environ.copy()
if config.config_calibre_split:
my_env['CALIBRE_OVERRIDE_DATABASE_PATH'] = os.path.join(config.config_calibre_dir, "metadata.db")
library_path = config.config_calibre_split_dir
else:
library_path = config.config_calibre_dir
opf_command = [calibredb_binarypath, 'show_metadata', '--as-opf', str(self.book_id),
'--with-library', config.config_calibre_dir]
p = process_open(opf_command, quotes)
'--with-library', library_path]
p = process_open(opf_command, quotes, my_env)
p.wait()
path_tmp_opf = os.path.join(tmp_dir, "metadata_" + str(uuid4()) + ".opf")
with open(path_tmp_opf, 'w') as fd: