From 18d64134679e16e4010f457da6f2508ee15df718 Mon Sep 17 00:00:00 2001 From: tomthumb1997 <37314994+tomthumb1997@users.noreply.github.com> Date: Mon, 12 Mar 2018 20:32:41 -0400 Subject: [PATCH] Update __init__.py --- DeDRM_calibre_plugin/DeDRM_plugin/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py b/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py index 19eee96..7bfe1a8 100644 --- a/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py +++ b/DeDRM_calibre_plugin/DeDRM_plugin/__init__.py @@ -63,6 +63,8 @@ __docformat__ = 'restructuredtext en' # 6.5.3 - Warn about KFX files explicitly # 6.5.4 - Mac App Fix, improve PDF decryption, handle latest tcl changes in ActivePython # 6.5.5 - Finally a fix for the Windows non-ASCII user names. +# 6.x.x - Add kfx and kfx-zip as supported file types (also invoke this plugin if the original +# imported format was azw8 since that may be converted to kfx) """ @@ -118,7 +120,7 @@ class DeDRM(FileTypePlugin): author = u"Apprentice Alf, Aprentice Harper, The Dark Reverser and i♥cabbages" version = PLUGIN_VERSION_TUPLE minimum_calibre_version = (1, 0, 0) # Compiled python libraries cannot be imported in earlier versions. - file_types = set(['epub','pdf','pdb','prc','mobi','pobi','azw','azw1','azw3','azw4','tpz']) + file_types = set(['epub','pdf','pdb','prc','mobi','pobi','azw','azw1','azw3','azw4','azw8','tpz','kfx','kfx-zip']) on_import = True priority = 600 @@ -613,7 +615,7 @@ class DeDRM(FileTypePlugin): self.starttime = time.time() booktype = os.path.splitext(path_to_ebook)[1].lower()[1:] - if booktype in ['prc','mobi','pobi','azw','azw1','azw3','azw4','tpz']: + if booktype in ['prc','mobi','pobi','azw','azw1','azw3','azw4','tpz','kfx-zip']: # Kindle/Mobipocket decrypted_ebook = self.KindleMobiDecrypt(path_to_ebook) elif booktype == 'pdb':