mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 02:51:48 +02:00
Put Nook STR Cover 'fix' back in.
This commit is contained in:
parent
f7bf2f7d0a
commit
d50e6d084b
1 changed files with 4 additions and 3 deletions
|
|
@ -26,6 +26,7 @@ import re
|
|||
# py2 vs py3 transition
|
||||
from ..six import text_type as unicode
|
||||
from ..six import string_types as basestring
|
||||
from ..six import ensure_binary
|
||||
from ..six import BytesIO # StringIO under py2
|
||||
|
||||
## XML isn't as forgiving as HTML, so rather than generate as strings,
|
||||
|
|
@ -580,10 +581,10 @@ div { margin: 0pt; padding: 0pt; }
|
|||
|
||||
# write content.opf to zip.
|
||||
contentxml = contentdom.toxml(encoding='utf-8')
|
||||
# Causes py2 vs py3 issues with encoding nonsense. Skip for now.
|
||||
# tweak for brain damaged Nook STR. Nook insists on name before content.
|
||||
# contentxml = contentxml.replace('<meta content="%s" name="cover"/>'%coverimgid,
|
||||
# '<meta name="cover" content="%s"/>'%coverimgid)
|
||||
contentxml = contentxml.replace(ensure_binary('<meta content="%s" name="cover"/>'%coverimgid),
|
||||
ensure_binary('<meta name="cover" content="%s"/>'%coverimgid))
|
||||
|
||||
outputepub.writestr("content.opf",contentxml)
|
||||
|
||||
contentdom.unlink()
|
||||
|
|
|
|||
Loading…
Reference in a new issue