mirror of https://github.com/evilhero/mylar
FIX:(#2158) Fix for metatagging on systems where rarfile was attempted to load from the incorrect source location
This commit is contained in:
parent
0733aa0f39
commit
88bfe29d28
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue