fixes
parent
cc2fbd8f6f
commit
1495a0f975
|
@ -69,7 +69,7 @@ def get_platform():
|
||||||
else:
|
else:
|
||||||
ret["system"] = 'android_x86'
|
ret["system"] = 'android_x86'
|
||||||
ret["message"] = ['Please contact DiMartino on kodi.tv forum. We compiled python-libtorrent for Android,',
|
ret["message"] = ['Please contact DiMartino on kodi.tv forum. We compiled python-libtorrent for Android,',
|
||||||
'but we need your help with some tests on diffrient processeors.']
|
'but we need your help with some tests on different processors.']
|
||||||
elif ret["os"] == "darwin":
|
elif ret["os"] == "darwin":
|
||||||
ret["system"] = 'darwin'
|
ret["system"] = 'darwin'
|
||||||
ret["message"] = ['It is possible to compile python-libtorrent for OS X.',
|
ret["message"] = ['It is possible to compile python-libtorrent for OS X.',
|
||||||
|
|
|
@ -17,8 +17,6 @@ libtorrent=None
|
||||||
platform = get_platform()
|
platform = get_platform()
|
||||||
dirname = os.path.join(xbmc.translatePath('special://temp'), 'xbmcup', 'script.module.libtorrent',
|
dirname = os.path.join(xbmc.translatePath('special://temp'), 'xbmcup', 'script.module.libtorrent',
|
||||||
'python_libtorrent')
|
'python_libtorrent')
|
||||||
#dirname = os.path.join(xbmc.translatePath('special://home'), 'addons', 'script.module.libtorrent',
|
|
||||||
# 'python_libtorrent')
|
|
||||||
dest_path = os.path.join(dirname, platform['system'])
|
dest_path = os.path.join(dirname, platform['system'])
|
||||||
sys.path.insert(0, dest_path)
|
sys.path.insert(0, dest_path)
|
||||||
|
|
||||||
|
@ -50,7 +48,10 @@ try:
|
||||||
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
||||||
log('fp = ' + str(fp))
|
log('fp = ' + str(fp))
|
||||||
log('pathname = ' + str(pathname))
|
log('pathname = ' + str(pathname))
|
||||||
|
try:
|
||||||
libtorrent = imp.load_module('libtorrent', fp, pathname, description)
|
libtorrent = imp.load_module('libtorrent', fp, pathname, description)
|
||||||
|
finally:
|
||||||
|
if fp: fp.close()
|
||||||
|
|
||||||
log('Imported libtorrent v' + libtorrent.version + ' from ' + dest_path)
|
log('Imported libtorrent v' + libtorrent.version + ' from ' + dest_path)
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class DownloaderClass():
|
||||||
text = 'Failed download %s!' % libname
|
text = 'Failed download %s!' % libname
|
||||||
xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
|
xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
|
||||||
else:
|
else:
|
||||||
x=xbmcvfs.copy(os.path.join(self.dest_path, 'libtorrent.so', dest))
|
x=xbmcvfs.copy(os.path.join(self.dest_path, 'libtorrent.so'), dest)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def log(msg):
|
def log(msg):
|
||||||
|
|
Loading…
Reference in New Issue