This commit is contained in:
Gregory Salaun 2022-01-26 20:08:55 +07:00
parent c3f4c2d3cc
commit aadea00bfa

View File

@ -20,9 +20,10 @@ for section in section_folders:
if os.path.exists(os.path.join(source_path, section)): if os.path.exists(os.path.join(source_path, section)):
for dir in os.listdir(os.path.join(source_path, section)): for dir in os.listdir(os.path.join(source_path, section)):
rar_file = glob(f"{os.path.join(source_path, section, dir, '')}*rar") rar_file = glob(f"{os.path.join(source_path, section, dir, '')}*rar")
print(f"Found rar file: {rar_file}")
if rar_file: if rar_file:
print(f"Found rar file {rar_file}") print(f"Found rar file {rar_file}")
subprocess.run(["/usr/bin/unrar", 'e', rar_file[0], '-idq', rar_file]) subprocess.run(["/usr/bin/unrar", 'e', rar_file[0], '-idq', os.path.join(source_path, section, dir, rar_file)])
for section in section_folders: for section in section_folders:
if os.path.exists(os.path.join(source_path, section)): if os.path.exists(os.path.join(source_path, section)):