Fix PDF generation for non-vanishing collection path
This commit is contained in:
parent
62bb338898
commit
1ee58510df
1 changed files with 4 additions and 3 deletions
|
@ -110,7 +110,7 @@ def get_settings():
|
|||
settings_path = config_dir / 'settings.json'
|
||||
try:
|
||||
with open(settings_path, 'r') as file:
|
||||
setting_cache = json.loads(file.read())
|
||||
settings_cache = json.loads(file.read())
|
||||
return deepcopy(settings_cache or {})
|
||||
except Exception as err:
|
||||
logger.exception(err)
|
||||
|
@ -569,7 +569,8 @@ async def create_pdf(pages, lossy: bool = False, ocr: bool = False):
|
|||
for p in cache_dir_pdf.iterdir():
|
||||
p.unlink()
|
||||
|
||||
img_paths = [str(archive_dir / f'{page}.png') for page in pages]
|
||||
collection_choice = Path(get_settings().get('collection_choice', '.'))
|
||||
img_paths = [str(archive_dir / collection_choice / f'{page}.png') for page in pages]
|
||||
|
||||
if lossy:
|
||||
cmd = [
|
||||
|
|
Loading…
Reference in a new issue