mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-20 09:45:14 +02:00
Emblems for the opf and ncx files
This commit is contained in:
parent
d8dc718abf
commit
77887df865
1 changed files with 5 additions and 0 deletions
|
|
@ -258,6 +258,7 @@ def render_emblems(item, emblems):
|
|||
|
||||
ok_to_be_unmanifested = container.names_that_need_not_be_manifested
|
||||
cannot_be_renamed = container.names_that_must_not_be_changed
|
||||
ncx_mime = guess_type('a.ncx')
|
||||
|
||||
def create_item(name, linear=None):
|
||||
imt = container.mime_map.get(name, guess_type(name))
|
||||
|
|
@ -280,6 +281,10 @@ def create_item(name, linear=None):
|
|||
emblems = []
|
||||
if name in {cover_page_name, cover_image_name}:
|
||||
emblems.append('default_cover.png')
|
||||
if name in container.opf_name:
|
||||
emblems.append('metadata.png')
|
||||
if imt == ncx_mime:
|
||||
emblems.append('toc.png')
|
||||
if name not in manifested_names and name not in ok_to_be_unmanifested:
|
||||
emblems.append('dialog_question.png')
|
||||
if linear is False:
|
||||
|
|
|
|||
Loading…
Reference in a new issue