1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 12:30:00 +00:00

don't mutate meta into a str, keep it a namedtuple

This commit is contained in:
whilenot 2023-04-30 13:37:08 +02:00
parent fe4dc1bb8f
commit 940544577a

View File

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