mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
EPUB metadata: Strip pointless urn:isbn: prefix from ISBN declaration when reading metadata
This commit is contained in:
parent
fc6981d1d5
commit
ee808594ca
@ -883,6 +883,8 @@ class OPF(object): # {{{
|
|||||||
val = etree.tostring(x, with_tail=False, encoding=unicode,
|
val = etree.tostring(x, with_tail=False, encoding=unicode,
|
||||||
method='text').strip()
|
method='text').strip()
|
||||||
if val and typ not in ('calibre', 'uuid'):
|
if val and typ not in ('calibre', 'uuid'):
|
||||||
|
if typ == 'isbn' and val.lower().startswith('urn:isbn:'):
|
||||||
|
val = val[len('urn:isbn:'):]
|
||||||
identifiers[typ] = val
|
identifiers[typ] = val
|
||||||
found_scheme = True
|
found_scheme = True
|
||||||
break
|
break
|
||||||
|
Loading…
x
Reference in New Issue
Block a user