]> xmof Git - DeDRM.git/commitdiff
Update __init__.py
authortomthumb1997 <37314994+tomthumb1997@users.noreply.github.com>
Tue, 13 Mar 2018 00:32:41 +0000 (20:32 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Mar 2018 00:32:41 +0000 (20:32 -0400)
DeDRM_calibre_plugin/DeDRM_plugin/__init__.py

index 19eee96ef3440e2239da4f9aad53674d6c153979..7bfe1a8e0ba445c02c201adc47168fabf9747234 100644 (file)
@@ -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':