1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-24 10:37:23 +00:00

Fixes Uploading pdf file fails with whitespace title (#2824)

Merge remote-tracking branch 'pdf_title/fix/title-parsing-of-pdf-metadata'
This commit is contained in:
Ozzie Isaacs 2023-08-12 14:08:26 +02:00
commit ba0e5399d6

View File

@ -88,7 +88,7 @@ def process(tmp_file_path, original_file_name, original_file_extension, rar_exec
log.warning('cannot parse metadata, using default: %s', ex)
if not meta.title.strip():
meta = original_file_name
meta = meta._replace(title=original_file_name)
if not meta.author.strip() or meta.author.lower() == 'unknown':
meta = meta._replace(author=_('Unknown'))
return meta