about summary refs log tree commit diff
path: root/kindlecomicconverter/comic2ebook.py
diff options
context:
space:
mode:
authorPaweł Jastrzębski <pawelj@iosphe.re>2018-07-08 08:42:34 +0200
committerPaweł Jastrzębski <pawelj@iosphe.re>2018-07-08 08:42:34 +0200
commitef4a91e44d03506e24e6255e09540226b33d5791 (patch)
treed2c6084cf4aac805e6e3923f02089ca6d18ab217 /kindlecomicconverter/comic2ebook.py
parentMerge branch 'Gokuroro-master' into dev (diff)
downloadkcc-ef4a91e44d03506e24e6255e09540226b33d5791.tar.gz
kcc-ef4a91e44d03506e24e6255e09540226b33d5791.tar.bz2
kcc-ef4a91e44d03506e24e6255e09540226b33d5791.zip
WebP support (close #263)
Diffstat (limited to 'kindlecomicconverter/comic2ebook.py')
-rwxr-xr-xkindlecomicconverter/comic2ebook.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py
index b560825..e118b7e 100755
--- a/kindlecomicconverter/comic2ebook.py
+++ b/kindlecomicconverter/comic2ebook.py
@@ -790,7 +790,8 @@ def splitDirectory(path):
     level = -1
     for root, _, files in os.walk(os.path.join(path, 'OEBPS', 'Images')):
         for f in files:
-            if f.endswith('.jpg') or f.endswith('.jpeg') or f.endswith('.png') or f.endswith('.gif'):
+            if f.endswith('.jpg') or f.endswith('.jpeg') or f.endswith('.png') or f.endswith('.gif') or \
+                    f.endswith('.webp'):
                 newLevel = os.path.join(root, f).replace(os.path.join(path, 'OEBPS', 'Images'), '').count(os.sep)
                 if level != -1 and level != newLevel:
                     level = 0