mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
Dropped Kindle Fire support
This commit is contained in:
@@ -375,9 +375,6 @@ class WorkerThread(QtCore.QThread):
|
||||
elif GUI.QualityBox.checkState() == 2:
|
||||
options.quality = 2
|
||||
options.format = str(GUI.FormatBox.currentText())
|
||||
if GUI.currentMode == 1:
|
||||
if 'KFH' in profile:
|
||||
options.upscale = True
|
||||
|
||||
# Advanced mode settings
|
||||
if GUI.currentMode > 1:
|
||||
@@ -1170,12 +1167,6 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
'DefaultUpscale': False, 'Label': 'K345'},
|
||||
"Kindle DX/DXG": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 2,
|
||||
'DefaultUpscale': False, 'Label': 'KDX'},
|
||||
"K. Fire HD": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||
'DefaultUpscale': True, 'Label': 'KFHD'},
|
||||
"K. Fire HDX": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||
'DefaultUpscale': True, 'Label': 'KFHDX'},
|
||||
"K. Fire HDX 8.9": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||
'DefaultUpscale': True, 'Label': 'KFHDX8'},
|
||||
"Kobo Mini/Touch": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1,
|
||||
'DefaultUpscale': False, 'Label': 'KoMT'},
|
||||
"Kobo Glo": {'Quality': True, 'ForceExpert': False, 'DefaultFormat': 1,
|
||||
@@ -1190,8 +1181,6 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
'DefaultUpscale': False, 'Label': 'KoAH2O'},
|
||||
"Other": {'Quality': False, 'ForceExpert': True, 'DefaultFormat': 1,
|
||||
'DefaultUpscale': False, 'Label': 'OTHER'},
|
||||
"Kindle for Android": {'Quality': False, 'ForceExpert': True, 'DefaultFormat': 0,
|
||||
'DefaultUpscale': False, 'Label': 'KFA'},
|
||||
"Kindle 1": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||
'DefaultUpscale': False, 'Label': 'K1'},
|
||||
"Kindle 2": {'Quality': False, 'ForceExpert': False, 'DefaultFormat': 0,
|
||||
@@ -1202,10 +1191,6 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
"Kindle PW 1/2",
|
||||
"Kindle",
|
||||
"Separator",
|
||||
"K. Fire HD",
|
||||
"K. Fire HDX",
|
||||
"K. Fire HDX 8.9",
|
||||
"Separator",
|
||||
"Kobo Mini/Touch",
|
||||
"Kobo Glo",
|
||||
"Kobo Glo HD",
|
||||
@@ -1215,7 +1200,6 @@ class KCCGUI(KCC_ui.Ui_KCC):
|
||||
"Separator",
|
||||
"Other",
|
||||
"Separator",
|
||||
"Kindle for Android",
|
||||
"Kindle 1",
|
||||
"Kindle 2",
|
||||
"Kindle DX/DXG",
|
||||
|
||||
@@ -1039,8 +1039,8 @@ def makeParser():
|
||||
otherOptions = OptionGroup(psr, "OTHER")
|
||||
|
||||
mainOptions.add_option("-p", "--profile", action="store", dest="profile", default="KV",
|
||||
help="Device profile (Available options: K1, K2, K345, KDX, KPW, KV, KFHD, KFHDX, KFHDX8,"
|
||||
" KFA, KoMT, KoG, KoGHD, KoA, KoAHD, KoAH2O) [Default=KV]")
|
||||
help="Device profile (Available options: K1, K2, K345, KDX, KPW, KV, KoMT, KoG, KoGHD,"
|
||||
" KoA, KoAHD, KoAH2O) [Default=KV]")
|
||||
mainOptions.add_option("-q", "--quality", type="int", dest="quality", default="0",
|
||||
help="Quality of Panel View. 0 - Normal 1 - High 2 - Ultra [Default=0]")
|
||||
mainOptions.add_option("-m", "--manga-style", action="store_true", dest="righttoleft", default=False,
|
||||
@@ -1103,13 +1103,13 @@ def checkOptions():
|
||||
options.iskindle = False
|
||||
options.bordersColor = None
|
||||
if options.format == 'Auto':
|
||||
if options.profile in ['K1', 'K2', 'K345', 'KPW', 'KV', 'KFHD', 'KFHDX', 'KFHDX8', 'KFA']:
|
||||
if options.profile in ['K1', 'K2', 'K345', 'KPW', 'KV']:
|
||||
options.format = 'MOBI'
|
||||
elif options.profile in ['OTHER', 'KoMT', 'KoG', 'KoGHD', 'KoA', 'KoAHD', 'KoAH2O']:
|
||||
options.format = 'EPUB'
|
||||
elif options.profile in ['KDX']:
|
||||
options.format = 'CBZ'
|
||||
if options.profile in ['K1', 'K2', 'K345', 'KPW', 'KV', 'KFHD', 'KFHDX', 'KFHDX8', 'KFA', 'OTHER']:
|
||||
if options.profile in ['K1', 'K2', 'K345', 'KPW', 'KV', 'OTHER']:
|
||||
options.iskindle = True
|
||||
if options.white_borders:
|
||||
options.bordersColor = 'white'
|
||||
@@ -1118,11 +1118,6 @@ def checkOptions():
|
||||
# Splitting MOBI is not optional
|
||||
if options.format == 'MOBI':
|
||||
options.batchsplit = True
|
||||
# Disabling grayscale conversion for Kindle Fire family.
|
||||
if 'KFH' in options.profile or options.forcecolor:
|
||||
options.forcecolor = True
|
||||
else:
|
||||
options.forcecolor = False
|
||||
# Older Kindle don't need higher resolution files due lack of Panel View.
|
||||
if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'KDX':
|
||||
options.quality = 0
|
||||
@@ -1141,10 +1136,6 @@ def checkOptions():
|
||||
# Kobo models can't use ultra quality mode
|
||||
if options.quality == 2:
|
||||
options.quality = 1
|
||||
# Kindle for Android profile require target resolution.
|
||||
if options.profile == 'KFA' and (options.customwidth == 0 or options.customheight == 0):
|
||||
print("ERROR: Kindle for Android profile require --customwidth and --customheight options!")
|
||||
sys.exit(1)
|
||||
# CBZ files on Kindle DX/DXG support higher resolution
|
||||
if options.profile == 'KDX' and options.format == 'CBZ':
|
||||
options.customheight = 1200
|
||||
|
||||
@@ -84,10 +84,6 @@ class ProfileData:
|
||||
'KDX': ("Kindle DX/DXG", (824, 1000), Palette16, 1.8, (1236, 1500)),
|
||||
'KPW': ("Kindle Paperwhite 1/2", (758, 1024), Palette16, 1.8, (1137, 1536)),
|
||||
'KV': ("Kindle Paperwhite 3/Voyage", (1072, 1448), Palette16, 1.8, (1608, 2172)),
|
||||
'KFHD': ("Kindle Fire HD", (800, 1280), PalleteNull, 1.0, (1200, 1920)),
|
||||
'KFHDX': ("Kindle Fire HDX", (1200, 1920), PalleteNull, 1.0, (1800, 2880)),
|
||||
'KFHDX8': ("Kindle Fire HDX 8.9", (1600, 2560), PalleteNull, 1.0, (2400, 3840)),
|
||||
'KFA': ("Kindle for Android", (0, 0), PalleteNull, 1.0, (0, 0)),
|
||||
'KoMT': ("Kobo Mini/Touch", (600, 800), Palette16, 1.8, (900, 1200)),
|
||||
'KoG': ("Kobo Glo", (768, 1024), Palette16, 1.8, (1152, 1536)),
|
||||
'KoGHD': ("Kobo Glo HD", (1072, 1448), Palette16, 1.8, (1608, 2172)),
|
||||
|
||||
Reference in New Issue
Block a user