Skip to content

Commit

Permalink
Dropped Kindle Fire support
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Jun 21, 2015
1 parent 8b07d4e commit 24d697c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 33 deletions.
16 changes: 0 additions & 16 deletions kcc/KCC_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,6 @@ def run(self):
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:
Expand Down Expand Up @@ -1170,12 +1167,6 @@ def __init__(self, KCCAplication, KCCWindow):
'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,
Expand All @@ -1190,8 +1181,6 @@ def __init__(self, KCCAplication, KCCWindow):
'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,
Expand All @@ -1202,10 +1191,6 @@ def __init__(self, KCCAplication, KCCWindow):
"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",
Expand All @@ -1215,7 +1200,6 @@ def __init__(self, KCCAplication, KCCWindow):
"Separator",
"Other",
"Separator",
"Kindle for Android",
"Kindle 1",
"Kindle 2",
"Kindle DX/DXG",
Expand Down
17 changes: 4 additions & 13 deletions kcc/comic2ebook.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 0 additions & 4 deletions kcc/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ def __init__(self):
'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)),
Expand Down

0 comments on commit 24d697c

Please sign in to comment.