mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix bug #8231.
This commit is contained in:
parent
7d395ecf5e
commit
0d5c69cd64
@ -65,9 +65,9 @@ class Reader(FormatReader):
|
|||||||
from calibre.customize.ui import plugin_for_input_format
|
from calibre.customize.ui import plugin_for_input_format
|
||||||
|
|
||||||
txt_plugin = plugin_for_input_format('txt')
|
txt_plugin = plugin_for_input_format('txt')
|
||||||
for option in txt_plugin.options:
|
for opt in txt_plugin.options:
|
||||||
if not hasattr(self.options, option.option.name):
|
if not hasattr(self.options, opt.option.name):
|
||||||
setattr(self.options, option.name, option.recommended_value)
|
setattr(self.options, opt.option.name, opt.recommended_value)
|
||||||
|
|
||||||
stream.seek(0)
|
stream.seek(0)
|
||||||
return txt_plugin.convert(stream, self.options, 'txt', self.log, {})
|
return txt_plugin.convert(stream, self.options, 'txt', self.log, {})
|
||||||
|
@ -31,9 +31,9 @@ class Reader(FormatReader):
|
|||||||
from calibre.customize.ui import plugin_for_input_format
|
from calibre.customize.ui import plugin_for_input_format
|
||||||
|
|
||||||
pdf_plugin = plugin_for_input_format('pdf')
|
pdf_plugin = plugin_for_input_format('pdf')
|
||||||
for option in pdf_plugin.options:
|
for opt in pdf_plugin.options:
|
||||||
if not hasattr(self.options, option.option.name):
|
if not hasattr(self.options, opt.option.name):
|
||||||
setattr(self.options, option.name, option.recommended_value)
|
setattr(self.options, opt.option.name, opt.recommended_value)
|
||||||
|
|
||||||
pdf.seek(0)
|
pdf.seek(0)
|
||||||
return pdf_plugin.convert(pdf, self.options, 'pdf', self.log, {})
|
return pdf_plugin.convert(pdf, self.options, 'pdf', self.log, {})
|
||||||
|
@ -83,9 +83,9 @@ class Reader(FormatReader):
|
|||||||
from calibre.customize.ui import plugin_for_input_format
|
from calibre.customize.ui import plugin_for_input_format
|
||||||
|
|
||||||
txt_plugin = plugin_for_input_format('txt')
|
txt_plugin = plugin_for_input_format('txt')
|
||||||
for option in txt_plugin.options:
|
for opt in txt_plugin.options:
|
||||||
if not hasattr(self.options, option.option.name):
|
if not hasattr(self.options, opt.option.name):
|
||||||
setattr(self.options, option.name, option.recommended_value)
|
setattr(self.options, opt.option.name, opt.recommended_value)
|
||||||
|
|
||||||
stream.seek(0)
|
stream.seek(0)
|
||||||
return txt_plugin.convert(stream, self.options, 'txt', self.log, {})
|
return txt_plugin.convert(stream, self.options, 'txt', self.log, {})
|
||||||
|
@ -26,9 +26,9 @@ class TCRInput(InputFormatPlugin):
|
|||||||
from calibre.customize.ui import plugin_for_input_format
|
from calibre.customize.ui import plugin_for_input_format
|
||||||
|
|
||||||
txt_plugin = plugin_for_input_format('txt')
|
txt_plugin = plugin_for_input_format('txt')
|
||||||
for option in txt_plugin.options:
|
for opt in txt_plugin.options:
|
||||||
if not hasattr(options, option.option.name):
|
if not hasattr(self.options, opt.option.name):
|
||||||
setattr(options, option.name, option.recommended_value)
|
setattr(self.options, opt.option.name, opt.recommended_value)
|
||||||
|
|
||||||
stream.seek(0)
|
stream.seek(0)
|
||||||
return txt_plugin.convert(stream, options,
|
return txt_plugin.convert(stream, options,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user