MOBI Metadata: Add 113 record for ebooks when editing metadata if it does not exist.

This commit is contained in:
John Schember 2011-03-27 15:12:41 -04:00
parent 80ec48e50b
commit bd6cb6e694

View File

@ -370,6 +370,9 @@ class MetadataUpdater(object):
update_exth_record((203, pack('>I', 0)))
if self.thumbnail_record is not None:
update_exth_record((202, pack('>I', self.thumbnail_rindex)))
if 113 not in self.original_exth_records and 501 in self.original_exth_records and self.original_exth_records[501] == 'EBOK' and not recs.has_key(501):
from uuid import uuid4
update_exth_record((113, str(uuid4())))
if 503 in self.original_exth_records:
update_exth_record((503, mi.title.encode(self.codec, 'replace')))