fixes
This commit is contained in:
1 parent
cc2fbd8f6f
commit
1495a0f975
3 files changed
+6
-5
No files matched your search
@@ -17,8 +17,6 @@ libtorrent=None
|
||||
platform = get_platform()
|
||||
dirname = os.path.join(xbmc.translatePath('special://temp'), 'xbmcup', 'script.module.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'])
|
||||
sys.path.insert(0, dest_path)
|
||||
|
||||
@@ -50,7 +48,10 @@ try:
|
||||
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
||||
log('fp = ' + str(fp))
|
||||
log('pathname = ' + str(pathname))
|
||||
libtorrent = imp.load_module('libtorrent', fp, pathname, description)
|
||||
try:
|
||||
libtorrent = imp.load_module('libtorrent', fp, pathname, description)
|
||||
finally:
|
||||
if fp: fp.close()
|
||||
|
||||
log('Imported libtorrent v' + libtorrent.version + ' from ' + dest_path)
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class DownloaderClass():
|
||||
text = 'Failed download %s!' % libname
|
||||
xbmc.executebuiltin("XBMC.Notification(%s,%s,%s,%s)" % (__scriptname__,text,750,__icon__))
|
||||
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
|
||||
|
||||
def log(msg):
|
||||
|
||||
Reference in new issue
Block a user