FIX:(#2158) Fix for metatagging on systems where rarfile was attempted to load from the incorrect source location

This commit is contained in:
evilhero 2019-01-14 09:46:48 -05:00
parent 0733aa0f39
commit 88bfe29d28
1 changed files with 10 additions and 1 deletions

View File

@ -26,7 +26,16 @@ import time
import StringIO
from natsort import natsorted
from rarfile import rarfile
try:
site_root = os.path.dirname(os.path.realpath(__file__))
parent_root = os.path.abspath(os.path.join(site_root, os.pardir))
lib_path = os.path.abspath(os.path.join(parent_root, os.pardir))
if lib_path not in sys.path:
sys.path.append(lib_path)
from rarfile import rarfile
except:
from lib.rarfile import rarfile
if platform.system() == "Windows":
import _subprocess