From 9d7fc39c3c4ee17e8987d89af74b2f6bcabde325 Mon Sep 17 00:00:00 2001 From: rouggy Date: Wed, 26 Jan 2022 18:46:39 +0700 Subject: [PATCH] update --- filebot.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/filebot.py b/filebot.py index 8461205..1a88da7 100644 --- a/filebot.py +++ b/filebot.py @@ -24,14 +24,14 @@ for root, dirs, files in os.walk(source_path): if rar_file: subprocess.run(["/usr/bin/unrar", 'e', rar_file[0], '-idq', '']) -print("Deleting rar, sfv, nfo files...") -for root, dirs, files in os.walk(source_path): - for dir in dirs: - if re.search('sample', dir, re.IGNORECASE) or re.search('proof', dir, re.IGNORECASE): - 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)) +# print("Deleting rar, sfv, nfo files...") +# for root, dirs, files in os.walk(source_path): +# for dir in dirs: +# if re.search('sample', dir, re.IGNORECASE) or re.search('proof', dir, re.IGNORECASE): +# 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 dir in dirs: