mirror of
https://github.com/ciromattia/kcc
synced 2025-12-21 21:51:52 +00:00
Changed output extension
This commit is contained in:
@@ -109,6 +109,9 @@ class WebServerHandler(BaseHTTPRequestHandler):
|
|||||||
if self.path.endswith('.mobi'):
|
if self.path.endswith('.mobi'):
|
||||||
mimetype = 'application/x-mobipocket-ebook'
|
mimetype = 'application/x-mobipocket-ebook'
|
||||||
sendReply = True
|
sendReply = True
|
||||||
|
if self.path.endswith('.azw3'):
|
||||||
|
mimetype = 'application/x-mobipocket-ebook'
|
||||||
|
sendReply = True
|
||||||
if self.path.endswith('.epub'):
|
if self.path.endswith('.epub'):
|
||||||
mimetype = 'application/epub+zip'
|
mimetype = 'application/epub+zip'
|
||||||
sendReply = True
|
sendReply = True
|
||||||
@@ -491,10 +494,11 @@ class WorkerThread(QtCore.QThread):
|
|||||||
GUI.progress.content = ''
|
GUI.progress.content = ''
|
||||||
mobiPath = item.replace('.epub', '.mobi')
|
mobiPath = item.replace('.epub', '.mobi')
|
||||||
os.remove(mobiPath + '_toclean')
|
os.remove(mobiPath + '_toclean')
|
||||||
GUI.completedWork[os.path.basename(mobiPath).encode('utf-8')] = \
|
if profile in ['K345', 'KHD', 'KF', 'KFHD', 'KFHD8', 'KFHDX', 'KFHDX8', 'KFA']:
|
||||||
mobiPath.encode('utf-8')
|
move(mobiPath, mobiPath.replace('.mobi', '.azw3'))
|
||||||
self.emit(QtCore.SIGNAL("addMessage"), 'Cleaning MOBI files... <b>Done!</b>', 'info',
|
mobiPath = item.replace('.mobi', '.azw3')
|
||||||
True)
|
GUI.completedWork[os.path.basename(mobiPath).encode('utf-8')] = mobiPath.encode('utf-8')
|
||||||
|
self.emit(QtCore.SIGNAL("addMessage"), 'Cleaning MOBI files... <b>Done!</b>', 'info', True)
|
||||||
else:
|
else:
|
||||||
GUI.progress.content = ''
|
GUI.progress.content = ''
|
||||||
for item in outputPath:
|
for item in outputPath:
|
||||||
|
|||||||
Reference in New Issue
Block a user