mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix exception in case of OPF with no <dc:title/>.
This commit is contained in:
parent
00820d24f4
commit
e4387cf308
@ -1003,7 +1003,10 @@ def merge_metadata(htmlfile, opf, opts):
|
||||
mi.cover = os.path.abspath(cover)
|
||||
|
||||
if not mi.title:
|
||||
mi.title = os.path.splitext(os.path.basename(htmlfile))[0]
|
||||
if htmlfile:
|
||||
mi.title = os.path.splitext(os.path.basename(htmlfile))[0]
|
||||
else:
|
||||
mi.title = _('Unknown')
|
||||
if not mi.authors:
|
||||
mi.authors = [_('Unknown')]
|
||||
return mi
|
||||
|
Loading…
x
Reference in New Issue
Block a user