delete system import
parent
06204dcd9c
commit
70d01a0043
|
@ -11,27 +11,20 @@ platform = get_platform()
|
||||||
print '[script.module.libtorrent]: platform ' + str(platform)
|
print '[script.module.libtorrent]: platform ' + str(platform)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import libtorrent
|
#dirname = os.path.join(xbmc.translatePath('special://home'), 'addons', 'script.module.libtorrent',
|
||||||
|
# 'python_libtorrent', platform['system'])
|
||||||
|
#sys.path.insert(0, dirname)
|
||||||
|
if platform['system'] == 'darwin':
|
||||||
|
from darwin.libtorrent import *
|
||||||
|
elif platform['system'] == 'linux_x86':
|
||||||
|
from linux_x86.libtorrent import *
|
||||||
|
elif platform['system'] == 'linux_x86_64':
|
||||||
|
from linux_x86_64.libtorrent import *
|
||||||
|
elif platform['system'] == 'windows':
|
||||||
|
from windows.libtorrent import *
|
||||||
|
|
||||||
print '[script.module.libtorrent]: Imported libtorrent v' + libtorrent.version + ' from system'
|
#print '[script.module.libtorrent]: Imported libtorrent v' + libtorrent.version + ' from python_libtorrent.' + platform[
|
||||||
|
# 'system']
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print '[script.module.libtorrent]: Error importing from system. Exception: ' + str(e)
|
print '[script.module.libtorrent]: Error importing python_libtorrent.' + platform['system'] + '. Exception: ' + str(e)
|
||||||
|
pass
|
||||||
try:
|
|
||||||
#dirname = os.path.join(xbmc.translatePath('special://home'), 'addons', 'script.module.libtorrent',
|
|
||||||
# 'python_libtorrent', platform['system'])
|
|
||||||
#sys.path.insert(0, dirname)
|
|
||||||
if platform['system'] == 'darwin':
|
|
||||||
from darwin.libtorrent import *
|
|
||||||
elif platform['system'] == 'linux_x86':
|
|
||||||
from linux_x86.libtorrent import *
|
|
||||||
elif platform['system'] == 'linux_x86_64':
|
|
||||||
from linux_x86_64.libtorrent import *
|
|
||||||
elif platform['system'] == 'windows':
|
|
||||||
from windows.libtorrent import *
|
|
||||||
|
|
||||||
#print '[script.module.libtorrent]: Imported libtorrent v' + libtorrent.version + ' from python_libtorrent.' + platform[
|
|
||||||
# 'system']
|
|
||||||
except Exception, e:
|
|
||||||
print '[script.module.libtorrent]: Error importing python_libtorrent.' + platform['system'] + '. Exception: ' + str(e)
|
|
||||||
pass
|
|
Loading…
Reference in New Issue