- document.edoc.getroot().set('data-cover-width', str(cover.width))
- document.edoc.getroot().set('data-cover-height', str(cover.height))
+ if cover is True:
+ cover = WLCover
+ bound_cover = cover(book_info)
+ root.set('data-cover-width', str(bound_cover.width))
+ root.set('data-cover-height', str(bound_cover.height))
+ if bound_cover.uses_dc_cover:
+ if book_info.cover_by:
+ root.set('data-cover-by', book_info.cover_by)
+ if book_info.cover_source:
+ root.set('data-cover-source',
+ book_info.cover_source)