mirror of
https://github.com/ciromattia/kcc
synced 2025-12-15 18:56:28 +00:00
fix state issue
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -12,3 +12,4 @@ KindleComicConverter*.egg-info/
|
|||||||
/kindlegen*
|
/kindlegen*
|
||||||
/kcc.bat
|
/kcc.bat
|
||||||
mozjpeg_lossless_optimization-*.whl
|
mozjpeg_lossless_optimization-*.whl
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -39,18 +39,14 @@ You can find the latest binary at the following link:
|
|||||||
- flatpak : https://flathub.org/apps/details/io.github.ciromattia.kcc
|
- flatpak : https://flathub.org/apps/details/io.github.ciromattia.kcc
|
||||||
- Docker: https://github.com/ciromattia/kcc/pkgs/container/kcc
|
- Docker: https://github.com/ciromattia/kcc/pkgs/container/kcc
|
||||||
|
|
||||||
~~- **[Windows](http://kcc.iosphe.re/Windows/) (64-bit only)**~~
|
|
||||||
~~- **[macOS](http://kcc.iosphe.re/OSX/) (10.14+)**~~
|
|
||||||
~~- **Linux:** Currently unavailable.~~
|
|
||||||
|
|
||||||
more information on [installation](https://github.com/ciromattia/kcc/wiki/Installation)
|
more information on [installation](https://github.com/ciromattia/kcc/wiki/Installation)
|
||||||
|
|
||||||
### DEPENDENCIES
|
### DEPENDENCIES
|
||||||
Following software is required to run Linux version of **KCC** and/or bare sources:
|
Following software is required to run Linux version of **KCC** and/or bare sources:
|
||||||
- Python 3.3+
|
- Python 3.3+
|
||||||
- [PyQt5](https://pypi.python.org/pypi/PyQt5) 5.6.0+ (only needed for GUI)
|
- [PySide6](https://pypi.org/project/PySide6/) 6.5.1+ (only needed for GUI)
|
||||||
- [Pillow](https://pypi.python.org/pypi/Pillow/) 4.0.0+ (5.2.0+ needed for WebP support)
|
- [Pillow](https://pypi.python.org/pypi/Pillow/) 4.0.0+ (5.2.0+ needed for WebP support)
|
||||||
- [psutil](https://pypi.python.org/pypi/psutil) 5.0.0+
|
- [psutil](https://pypi.python.org/pypi/psutil) 5.9.5+
|
||||||
- [python-slugify](https://pypi.python.org/pypi/python-slugify) 1.2.1+, <8.0.0
|
- [python-slugify](https://pypi.python.org/pypi/python-slugify) 1.2.1+, <8.0.0
|
||||||
- [raven](https://pypi.python.org/pypi/raven) 6.0.0+ (only needed for GUI)
|
- [raven](https://pypi.python.org/pypi/raven) 6.0.0+ (only needed for GUI)
|
||||||
|
|
||||||
|
|||||||
@@ -771,23 +771,23 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
self.settings.setValue('currentFormat', GUI.formatBox.currentIndex())
|
self.settings.setValue('currentFormat', GUI.formatBox.currentIndex())
|
||||||
self.settings.setValue('startNumber', self.startNumber + 1)
|
self.settings.setValue('startNumber', self.startNumber + 1)
|
||||||
self.settings.setValue('windowSize', str(MW.size().width()) + 'x' + str(MW.size().height()))
|
self.settings.setValue('windowSize', str(MW.size().width()) + 'x' + str(MW.size().height()))
|
||||||
self.settings.setValue('options', {'mangaBox': GUI.mangaBox.checkState(),
|
self.settings.setValue('options', {'mangaBox': GUI.mangaBox.checkState().value,
|
||||||
'rotateBox': GUI.rotateBox.checkState(),
|
'rotateBox': GUI.rotateBox.checkState().value,
|
||||||
'qualityBox': GUI.qualityBox.checkState(),
|
'qualityBox': GUI.qualityBox.checkState().value,
|
||||||
'gammaBox': GUI.gammaBox.checkState(),
|
'gammaBox': GUI.gammaBox.checkState().value,
|
||||||
'croppingBox': GUI.croppingBox.checkState(),
|
'croppingBox': GUI.croppingBox.checkState().value,
|
||||||
'croppingPowerSlider': float(self.croppingPowerValue) * 100,
|
'croppingPowerSlider': float(self.croppingPowerValue) * 100,
|
||||||
'upscaleBox': GUI.upscaleBox.checkState(),
|
'upscaleBox': GUI.upscaleBox.checkState().value,
|
||||||
'borderBox': GUI.borderBox.checkState(),
|
'borderBox': GUI.borderBox.checkState().value,
|
||||||
'webtoonBox': GUI.webtoonBox.checkState(),
|
'webtoonBox': GUI.webtoonBox.checkState().value,
|
||||||
'outputSplit': GUI.outputSplit.checkState(),
|
'outputSplit': GUI.outputSplit.checkState().value,
|
||||||
'colorBox': GUI.colorBox.checkState(),
|
'colorBox': GUI.colorBox.checkState().value,
|
||||||
'disableProcessingBox': GUI.disableProcessingBox.checkState(),
|
'disableProcessingBox': GUI.disableProcessingBox.checkState().value,
|
||||||
'mozJpegBox': GUI.mozJpegBox.checkState(),
|
'mozJpegBox': GUI.mozJpegBox.checkState().value,
|
||||||
'widthBox': GUI.widthBox.value(),
|
'widthBox': GUI.widthBox.value(),
|
||||||
'heightBox': GUI.heightBox.value(),
|
'heightBox': GUI.heightBox.value(),
|
||||||
'deleteBox': GUI.deleteBox.checkState(),
|
'deleteBox': GUI.deleteBox.checkState().value,
|
||||||
'maximizeStrips': GUI.maximizeStrips.checkState(),
|
'maximizeStrips': GUI.maximizeStrips.checkState().value,
|
||||||
'gammaSlider': float(self.gammaValue) * 100})
|
'gammaSlider': float(self.gammaValue) * 100})
|
||||||
self.settings.sync()
|
self.settings.sync()
|
||||||
self.tray.hide()
|
self.tray.hide()
|
||||||
@@ -874,7 +874,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
self.setupUi(MW)
|
self.setupUi(MW)
|
||||||
self.editor = KCCGUI_MetaEditor()
|
self.editor = KCCGUI_MetaEditor()
|
||||||
self.icons = Icons()
|
self.icons = Icons()
|
||||||
self.settings = QtCore.QSettings('KindleComicConverter', 'KindleComicConverter')
|
self.settings = QtCore.QSettings('ciromattia', 'kcc')
|
||||||
self.settingsVersion = self.settings.value('settingsVersion', '', type=str)
|
self.settingsVersion = self.settings.value('settingsVersion', '', type=str)
|
||||||
self.lastPath = self.settings.value('lastPath', '', type=str)
|
self.lastPath = self.settings.value('lastPath', '', type=str)
|
||||||
self.lastDevice = self.settings.value('lastDevice', 0, type=int)
|
self.lastDevice = self.settings.value('lastDevice', 0, type=int)
|
||||||
@@ -1116,7 +1116,7 @@ class KCCGUI(KCC_ui.Ui_mainWindow):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
if eval('GUI.' + str(option)).isEnabled():
|
if eval('GUI.' + str(option)).isEnabled():
|
||||||
eval('GUI.' + str(option)).setCheckState(QtCore.CheckState(self.options[option]))
|
eval('GUI.' + str(option)).setCheckState(Qt.CheckState(self.options[option]))
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
pass
|
pass
|
||||||
self.worker.sync()
|
self.worker.sync()
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ def getWorkFolder(afile):
|
|||||||
path = cbx.extract(workdir)
|
path = cbx.extract(workdir)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
rmtree(workdir, True)
|
rmtree(workdir, True)
|
||||||
raise UserWarning(e.strerror)
|
raise UserWarning(e)
|
||||||
else:
|
else:
|
||||||
raise UserWarning("Failed to open source file/directory.")
|
raise UserWarning("Failed to open source file/directory.")
|
||||||
sanitizePermissions(path)
|
sanitizePermissions(path)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class MetadataParser:
|
|||||||
self.rawdata = cbx.extractMetadata()
|
self.rawdata = cbx.extractMetadata()
|
||||||
self.format = cbx.type
|
self.format = cbx.type
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise UserWarning(e.strerror)
|
raise UserWarning(e)
|
||||||
if self.rawdata:
|
if self.rawdata:
|
||||||
self.parseXML()
|
self.parseXML()
|
||||||
|
|
||||||
@@ -121,5 +121,5 @@ class MetadataParser:
|
|||||||
cbx = comicarchive.ComicArchive(self.source)
|
cbx = comicarchive.ComicArchive(self.source)
|
||||||
cbx.addFile(tmpXML)
|
cbx.addFile(tmpXML)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise UserWarning(e.strerror)
|
raise UserWarning(e)
|
||||||
rmtree(workdir)
|
rmtree(workdir)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
PySide6
|
PySide6>=6.5.1
|
||||||
Pillow>=5.2.0
|
Pillow>=5.2.0
|
||||||
psutil>=5.9.5
|
psutil>=5.9.5
|
||||||
python-slugify>=1.2.1
|
python-slugify>=1.2.1
|
||||||
|
|||||||
Reference in New Issue
Block a user