mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Sync to trunk.
This commit is contained in:
commit
2a8a62914b
@ -2626,7 +2626,10 @@ class ITUNES(DriverBase):
|
|||||||
None,
|
None,
|
||||||
level=UserFeedback.WARN)
|
level=UserFeedback.WARN)
|
||||||
fnames = zf_opf.namelist()
|
fnames = zf_opf.namelist()
|
||||||
|
try:
|
||||||
opf = [x for x in fnames if '.opf' in x][0]
|
opf = [x for x in fnames if '.opf' in x][0]
|
||||||
|
except:
|
||||||
|
opf = None
|
||||||
if opf:
|
if opf:
|
||||||
opf_tree = etree.fromstring(zf_opf.read(opf))
|
opf_tree = etree.fromstring(zf_opf.read(opf))
|
||||||
md_els = opf_tree.xpath('.//*[local-name()="metadata"]')
|
md_els = opf_tree.xpath('.//*[local-name()="metadata"]')
|
||||||
|
@ -124,7 +124,14 @@ class Stylizer(object):
|
|||||||
|
|
||||||
def __init__(self, tree, path, oeb, opts, profile=None,
|
def __init__(self, tree, path, oeb, opts, profile=None,
|
||||||
extra_css='', user_css=''):
|
extra_css='', user_css=''):
|
||||||
|
from calibre.customize.ui import input_profiles
|
||||||
self.oeb, self.opts = oeb, opts
|
self.oeb, self.opts = oeb, opts
|
||||||
|
self.profile = None
|
||||||
|
for x in input_profiles():
|
||||||
|
if x.short_name == 'sony':
|
||||||
|
self.profile = x
|
||||||
|
break
|
||||||
|
if self.profile is None:
|
||||||
self.profile = opts.input_profile
|
self.profile = opts.input_profile
|
||||||
self.logger = oeb.logger
|
self.logger = oeb.logger
|
||||||
item = oeb.manifest.hrefs[path]
|
item = oeb.manifest.hrefs[path]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user