Merge pull request #103 from vicnoah/master

add WebM support
This commit is contained in:
Yoshiko 2020-02-12 17:19:15 +08:00 committed by GitHub
commit dd3d394d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ def argparse_get_file():
def movie_lists(escape_folder):
escape_folder = re.split('[,]', escape_folder)
total = []
file_type = ['.mp4', '.avi', '.rmvb', '.wmv', '.mov', '.mkv', '.flv', '.ts', '.MP4', '.AVI', '.RMVB', '.WMV','.MOV', '.MKV', '.FLV', '.TS', ]
file_type = ['.mp4', '.avi', '.rmvb', '.wmv', '.mov', '.mkv', '.flv', '.ts', '.webm', '.MP4', '.AVI', '.RMVB', '.WMV','.MOV', '.MKV', '.FLV', '.TS', '.WEBM', ]
file_root = os.getcwd()
for root, dirs, files in os.walk(file_root):
flag_escape = 0

View File

@ -548,7 +548,7 @@ def cutImage(option, imagecut, path, number, c_word):
def pasteFileToFolder(filepath, path, number, c_word): # 文件路径,番号,后缀,要移动至的位置
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|TS|avi|rmvb|wmv|mov|mp4|mkv|flv|ts)$', filepath).group())
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|TS|WEBM|avi|rmvb|wmv|mov|mp4|mkv|flv|ts|webm)$', filepath).group())
try:
if config['common']['soft_link'] == '1': # 如果soft_link=1 使用软链接
os.symlink(filepath, path + '/' + number + c_word + houzhui)
@ -575,7 +575,7 @@ def pasteFileToFolder(filepath, path, number, c_word): # 文件路径,番号
def pasteFileToFolder_mode2(filepath, path, multi_part, number, part, c_word): # 文件路径,番号,后缀,要移动至的位置
if multi_part == 1:
number += part # 这时number会被附加上CD1后缀
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|TS|avi|rmvb|wmv|mov|mp4|mkv|flv|ts)$', filepath).group())
houzhui = str(re.search('[.](AVI|RMVB|WMV|MOV|MP4|MKV|FLV|TS|WEBM|avi|rmvb|wmv|mov|mp4|mkv|flv|ts|webm)$', filepath).group())
try:
if config['common']['soft_link'] == '1':
os.symlink(filepath, path + '/' + number + part + c_word + houzhui)