From 4b0b073162eebf2739cae761b29772d781e4e1b2 Mon Sep 17 00:00:00 2001 From: rouggy Date: Wed, 26 Jan 2022 20:10:03 +0700 Subject: [PATCH] update --- filebot.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filebot.py b/filebot.py index 7410dba..24d136f 100644 --- a/filebot.py +++ b/filebot.py @@ -19,11 +19,12 @@ print("Checking if rar files and unraring...") for section in section_folders: if os.path.exists(os.path.join(source_path, section)): for dir in os.listdir(os.path.join(source_path, section)): + unrar_sys_package = '/usr/bin/unrar' rar_file = glob(f"{os.path.join(source_path, section, dir, '')}*rar") print(f"Found rar file: {rar_file}") if rar_file: - print(f"Found rar file {rar_file}") - subprocess.run(["/usr/bin/unrar", 'e', rar_file[0], '-idq', os.path.join(source_path, section, dir, rar_file)]) + print(f"Found rar file {os.path.join(source_path, section, dir, rar_file)}") + subprocess.run([unrar_sys_package, 'e', rar_file[0], '-idq', os.path.join(source_path, section, dir, rar_file)]) for section in section_folders: if os.path.exists(os.path.join(source_path, section)):