支持更多视频格式:mkv, mov, avi...

This commit is contained in:
biggerfish 2022-01-01 04:44:17 +08:00
parent 6c73a526e0
commit dc1872083a

View File

@ -19,8 +19,8 @@ from win32com.propsys import propsys, pscon
class Classifier(): class Classifier():
mode = 'prod' # 开发模式(dev)还是产品模式(prod) mode = 'prod' # 开发模式(dev)还是产品模式(prod)
IMAGE_EXTENTIONS = ['jpg', 'jpeg', 'bmp', 'png'] IMAGE_EXTENTIONS = ['jpg', 'jpeg', 'bmp', 'png', 'tif', 'gif']
VIDEO_EXTENTIONS = ['mp4'] VIDEO_EXTENTIONS = ['mp4', 'avi', 'rmvb', 'mkv', 'exe', 'mov', 'ppt', 'amr', 'mpg']
TEST_TABLE = 'TEST_PHOTO' TEST_TABLE = 'TEST_PHOTO'
TABLE = 'PHOTO' TABLE = 'PHOTO'
PHOTO_NO_DATE_KEYS = ['EXIF ExifVersion'] PHOTO_NO_DATE_KEYS = ['EXIF ExifVersion']
@ -144,7 +144,7 @@ class Classifier():
record = cursor.fetchone() record = cursor.fetchone()
if str(record) != 'None': if str(record) != 'None':
os.remove(file_path) os.remove(file_path)
raise Exception('重复照片 {} --> 删除'.format(file_path)) raise Exception('重复文件 {} --> 删除'.format(file_path))
except Exception as e: except Exception as e:
raise e raise e