mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 09:46:25 +00:00
Disabled ultra quality mode for CBZ format
This commit is contained in:
committed by
Paweł Jastrzębski
parent
aadfca8306
commit
99405ab8a6
@@ -829,6 +829,9 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
|||||||
if value == 2 and 'Kobo' in str(GUI.DeviceBox.currentText()):
|
if value == 2 and 'Kobo' in str(GUI.DeviceBox.currentText()):
|
||||||
self.addMessage('Kobo devices can\'t use ultra quality mode!', 'warning')
|
self.addMessage('Kobo devices can\'t use ultra quality mode!', 'warning')
|
||||||
GUI.QualityBox.setCheckState(0)
|
GUI.QualityBox.setCheckState(0)
|
||||||
|
elif value == 2 and 'CBZ' in str(GUI.FormatBox.currentText()):
|
||||||
|
self.addMessage('CBZ format don\'t support ultra quality mode!', 'warning')
|
||||||
|
GUI.QualityBox.setCheckState(0)
|
||||||
|
|
||||||
def changeGamma(self, value):
|
def changeGamma(self, value):
|
||||||
value = float(value)
|
value = float(value)
|
||||||
@@ -856,7 +859,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
|||||||
GUI.AdvModeButton.setEnabled(True)
|
GUI.AdvModeButton.setEnabled(True)
|
||||||
if self.currentMode == 3:
|
if self.currentMode == 3:
|
||||||
self.modeBasic()
|
self.modeBasic()
|
||||||
self.changeFormat()
|
self.changeFormat(event=False)
|
||||||
GUI.GammaSlider.setValue(0)
|
GUI.GammaSlider.setValue(0)
|
||||||
self.changeGamma(0)
|
self.changeGamma(0)
|
||||||
if profile['DefaultUpscale']:
|
if profile['DefaultUpscale']:
|
||||||
@@ -865,7 +868,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
|||||||
self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">'
|
self.addMessage('<a href="https://github.com/ciromattia/kcc/wiki/NonKindle-devices">'
|
||||||
'List of supported Non-Kindle devices.</a>', 'info')
|
'List of supported Non-Kindle devices.</a>', 'info')
|
||||||
|
|
||||||
def changeFormat(self, outputFormat=None):
|
def changeFormat(self, outputFormat=None, event=True):
|
||||||
profile = GUI.profiles[str(GUI.DeviceBox.currentText())]
|
profile = GUI.profiles[str(GUI.DeviceBox.currentText())]
|
||||||
if outputFormat is not None:
|
if outputFormat is not None:
|
||||||
GUI.FormatBox.setCurrentIndex(outputFormat)
|
GUI.FormatBox.setCurrentIndex(outputFormat)
|
||||||
@@ -890,6 +893,10 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
|||||||
if GUI.ProcessingBox.isChecked():
|
if GUI.ProcessingBox.isChecked():
|
||||||
GUI.QualityBox.setEnabled(False)
|
GUI.QualityBox.setEnabled(False)
|
||||||
GUI.QualityBox.setChecked(False)
|
GUI.QualityBox.setChecked(False)
|
||||||
|
if event and GUI.QualityBox.isEnabled() and 'CBZ' in str(GUI.FormatBox.currentText()) and\
|
||||||
|
GUI.QualityBox.checkState() == 2:
|
||||||
|
self.addMessage('CBZ format don\'t support ultra quality mode!', 'warning')
|
||||||
|
GUI.QualityBox.setCheckState(0)
|
||||||
|
|
||||||
def stripTags(self, html):
|
def stripTags(self, html):
|
||||||
s = HTMLStripper()
|
s = HTMLStripper()
|
||||||
@@ -1277,7 +1284,7 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
|||||||
GUI.DeviceBox.setCurrentIndex(self.lastDevice)
|
GUI.DeviceBox.setCurrentIndex(self.lastDevice)
|
||||||
self.changeDevice()
|
self.changeDevice()
|
||||||
if self.currentFormat != self.profiles[str(GUI.DeviceBox.currentText())]['DefaultFormat']:
|
if self.currentFormat != self.profiles[str(GUI.DeviceBox.currentText())]['DefaultFormat']:
|
||||||
self.changeFormat(self.currentFormat)
|
self.changeFormat(self.currentFormat, False)
|
||||||
for option in self.options:
|
for option in self.options:
|
||||||
if str(option) == "customWidth":
|
if str(option) == "customWidth":
|
||||||
GUI.customWidth.setText(str(self.options[option]))
|
GUI.customWidth.setText(str(self.options[option]))
|
||||||
|
|||||||
@@ -1015,6 +1015,9 @@ def checkOptions():
|
|||||||
# CBZ files on Kindle DX/DXG support higher resolution
|
# CBZ files on Kindle DX/DXG support higher resolution
|
||||||
if options.profile == 'KDX' and options.cbzoutput:
|
if options.profile == 'KDX' and options.cbzoutput:
|
||||||
options.customheight = 1200
|
options.customheight = 1200
|
||||||
|
# Ultra mode don't work with CBZ format
|
||||||
|
if options.quality == 2 and options.cbzoutput:
|
||||||
|
options.quality = 1
|
||||||
# Override profile data
|
# Override profile data
|
||||||
if options.customwidth != 0 or options.customheight != 0:
|
if options.customwidth != 0 or options.customheight != 0:
|
||||||
X = image.ProfileData.Profiles[options.profile][1][0]
|
X = image.ProfileData.Profiles[options.profile][1][0]
|
||||||
|
|||||||
Reference in New Issue
Block a user