'We generate the EXTH header and record0 dynamically, to allow other
code to customize various values after build_records() has been
called'

@property
def record0(self):

    opts = self.opts
    self.exth = build_exth(self.metadata, prefer_author_sort=opts.prefer_author_sort, is_periodical=opts.mobi_periodical, share_not_sync=opts.share_not_sync, cover_offset=self.cover_offset, thumbnail_offset=self.thumbnail_offset, num_of_resources=self.num_of_resources, kf8_unknown_count=self.kuc, be_kindlegen2=True, start_offset=self.start_offset, mobi_doctype=self.book_type, page_progression_direction=self.page_progression_direction, primary_writing_mode=self.primary_writing_mode)
    kwargs = {field: getattr(self, field) for field in HEADER_FIELDS}
    return MOBIHeader()(**kwargs)
