mirror of
https://github.com/ciromattia/kcc
synced 2025-12-13 01:36:27 +00:00
@@ -820,7 +820,7 @@ def removeNonImages(filetree):
|
||||
for root, dirs, files in os.walk(filetree):
|
||||
for name in files:
|
||||
_, ext = getImageFileName(name)
|
||||
if ext not in ('.png', '.jpg', '.jpeg', '.gif', '.webp', '.jp2'):
|
||||
if ext not in ('.png', '.jpg', '.jpeg', '.gif', '.webp', '.jp2', '.avif'):
|
||||
if os.path.exists(os.path.join(root, name)):
|
||||
os.remove(os.path.join(root, name))
|
||||
# remove empty nested folders
|
||||
|
||||
@@ -116,10 +116,10 @@ def dependencyCheck(level):
|
||||
missing.append('python-slugify 1.2.1+')
|
||||
try:
|
||||
from PIL import __version__ as pillowVersion
|
||||
if Version('5.2.0') > Version(pillowVersion):
|
||||
missing.append('Pillow 5.2.0+')
|
||||
if Version('11.3.0') > Version(pillowVersion):
|
||||
missing.append('Pillow 11.3.0+')
|
||||
except ImportError:
|
||||
missing.append('Pillow 5.2.0+')
|
||||
missing.append('Pillow 11.3.0+')
|
||||
if len(missing) > 0:
|
||||
print('ERROR: ' + ', '.join(missing) + ' is not installed!')
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user