mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Read calibre book uuid when reading metadata from MOBI files, needed for round-tripping to preserve the uuid when tweaking
This commit is contained in:
parent
a2a68d9fab
commit
d661b15ae2
@ -123,6 +123,12 @@ class EXTHHeader(object): # {{{
|
|||||||
raw = check_isbn(content[len(isig):])
|
raw = check_isbn(content[len(isig):])
|
||||||
if raw and not self.mi.isbn:
|
if raw and not self.mi.isbn:
|
||||||
self.mi.isbn = raw
|
self.mi.isbn = raw
|
||||||
|
elif content.startswith('calibre:'):
|
||||||
|
# calibre book uuid is stored here by recent calibre
|
||||||
|
# releases
|
||||||
|
cid = content[len('calibre:'):]
|
||||||
|
if cid:
|
||||||
|
self.mi.application_id = self.mi.uuid = cid
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
elif idx == 113: # ASIN or other id
|
elif idx == 113: # ASIN or other id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user