mirror of
https://github.com/ciromattia/kcc
synced 2026-09-02 08:57:06 +00:00
Little tweaks
This commit is contained in:
+1
-1
@@ -138,8 +138,8 @@ class WorkerThread(QtCore.QThread):
|
|||||||
self.emit(QtCore.SIGNAL("hideProgressBar"))
|
self.emit(QtCore.SIGNAL("hideProgressBar"))
|
||||||
except UserWarning as warn:
|
except UserWarning as warn:
|
||||||
self.errors = True
|
self.errors = True
|
||||||
self.emit(QtCore.SIGNAL("addMessage"), 'KCC failed to create output file!', 'warning')
|
|
||||||
self.emit(QtCore.SIGNAL("addMessage"), str(warn), 'warning')
|
self.emit(QtCore.SIGNAL("addMessage"), str(warn), 'warning')
|
||||||
|
self.emit(QtCore.SIGNAL("addMessage"), 'KCC failed to create output file!', 'warning')
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
self.errors = True
|
self.errors = True
|
||||||
type_, value_, traceback_ = sys.exc_info()
|
type_, value_, traceback_ = sys.exc_info()
|
||||||
|
|||||||
+3
-3
@@ -340,7 +340,7 @@ def applyImgOptimization(img, isSplit, toRight, options, overrideQuality=5):
|
|||||||
img.quantizeImage()
|
img.quantizeImage()
|
||||||
|
|
||||||
|
|
||||||
def dirImgProcess(path, origPath):
|
def dirImgProcess(path):
|
||||||
global options, splitCount
|
global options, splitCount
|
||||||
work = []
|
work = []
|
||||||
pagenumber = 0
|
pagenumber = 0
|
||||||
@@ -381,7 +381,7 @@ def dirImgProcess(path, origPath):
|
|||||||
pagenumbermodifier += 1
|
pagenumbermodifier += 1
|
||||||
else:
|
else:
|
||||||
rmtree(path)
|
rmtree(path)
|
||||||
raise UserWarning("Empty directory: " + origPath)
|
raise UserWarning("Source directory is empty.")
|
||||||
|
|
||||||
|
|
||||||
def fileImgProcess_init(queue, options):
|
def fileImgProcess_init(queue, options):
|
||||||
@@ -742,7 +742,7 @@ def main(argv=None, qtGUI=None):
|
|||||||
print "Processing images..."
|
print "Processing images..."
|
||||||
if GUI:
|
if GUI:
|
||||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Processing images')
|
GUI.emit(QtCore.SIGNAL("progressBarTick"), 'status', 'Processing images')
|
||||||
dirImgProcess(path + "/OEBPS/Images/", args[0])
|
dirImgProcess(path + "/OEBPS/Images/")
|
||||||
if GUI:
|
if GUI:
|
||||||
GUI.emit(QtCore.SIGNAL("progressBarTick"), 1)
|
GUI.emit(QtCore.SIGNAL("progressBarTick"), 1)
|
||||||
if options.cbzoutput:
|
if options.cbzoutput:
|
||||||
|
|||||||
Reference in New Issue
Block a user