first commit

This commit is contained in:
Gregory Salaun 2022-01-26 17:13:42 +07:00
commit 0199804d81
2 changed files with 14 additions and 0 deletions

14
filebot.py Normal file
View File

@ -0,0 +1,14 @@
from glob import glob
import shutil
import os
rar_file = glob(f"{os.path.join(rls.ContentPath, '')}*rar")
if rar_file:
# Now verify that unrar is installed
unrar_sys_package = '/usr/bin/unrar'
if os.path.isfile(unrar_sys_package):
console.print("Found rar files, extracting the files now", style="bold red")
# run the system package unrar and save the extracted file to its parent dir
subprocess.run([unrar_sys_package, 'e', rar_file[0], '-idq', rls.ContentPath])

0
requirements.txt Normal file
View File