This commit is contained in:
Gregory Salaun 2022-01-26 18:48:08 +07:00
parent 9d7fc39c3c
commit 7eac2071a7

View File

@ -24,14 +24,11 @@ for root, dirs, files in os.walk(source_path):
if rar_file: if rar_file:
subprocess.run(["/usr/bin/unrar", 'e', rar_file[0], '-idq', '']) subprocess.run(["/usr/bin/unrar", 'e', rar_file[0], '-idq', ''])
# print("Deleting rar, sfv, nfo files...") print("Deleting rar, sfv, nfo files...")
# for root, dirs, files in os.walk(source_path): for root, dirs, files in os.walk(source_path):
# for dir in dirs: for dir in dirs:
# if re.search('sample', dir, re.IGNORECASE) or re.search('proof', dir, re.IGNORECASE): if re.search('sample', dir, re.IGNORECASE) or re.search('proof', dir, re.IGNORECASE):
# shutil.rmtree(dir) shutil.rmtree(dir)
# for file in files:
# if re.search(r'\.r\d{2,3}', file) or file.endswith('.rar') or file.endswith('.sfv') or file.endswith('.nfo') or re.search('sample', file, re.IGNORECASE):
# os.remove(os.path.join(root, file))
for root, dirs, files in os.walk(source_path): for root, dirs, files in os.walk(source_path):
for dir in dirs: for dir in dirs: