mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
444b302473
commit
0f256ac9b1
@ -221,11 +221,11 @@ def metadata_from_xmp_packet(raw_bytes):
|
||||
root = parse_xmp_packet(raw_bytes)
|
||||
mi = Metadata(_('Unknown'))
|
||||
title = first_alt('//dc:title', root)
|
||||
if title.startswith(r'\376\377'):
|
||||
# corrupted XMP packet generated by Nitro PDF. See
|
||||
# https://bugs.launchpad.net/calibre/+bug/1541981
|
||||
raise ValueError('Corrupted XMP metadata packet detected, probably generated by Nitro PDF')
|
||||
if title:
|
||||
if title.startswith(r'\376\377'):
|
||||
# corrupted XMP packet generated by Nitro PDF. See
|
||||
# https://bugs.launchpad.net/calibre/+bug/1541981
|
||||
raise ValueError('Corrupted XMP metadata packet detected, probably generated by Nitro PDF')
|
||||
mi.title = title
|
||||
authors = multiple_sequences('//dc:creator', root)
|
||||
if authors:
|
||||
|
Loading…
x
Reference in New Issue
Block a user