android workaround update
parent
43b72172f7
commit
a25646b4c6
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||||
<addon id='script.module.libtorrent' version='0.16.19' name='LibTorrent' provider-name='DiMartino, srg70, RussakHH'>
|
<addon id='script.module.libtorrent' version='0.16.19b' name='LibTorrent' provider-name='DiMartino, srg70, RussakHH'>
|
||||||
<requires>
|
<requires>
|
||||||
<import addon='xbmc.python' version='2.1.0'/>
|
<import addon='xbmc.python' version='2.1.0'/>
|
||||||
</requires>
|
</requires>
|
||||||
|
|
|
@ -74,12 +74,21 @@ try:
|
||||||
log('CDLL = ' + str(liblibtorrent))
|
log('CDLL = ' + str(liblibtorrent))
|
||||||
except:
|
except:
|
||||||
# If no permission in dest_path we need to go deeper!
|
# If no permission in dest_path we need to go deeper!
|
||||||
# http://i3.kym-cdn.com/photos/images/original/000/531/557/a88.jpg
|
try:
|
||||||
dest_path=lm.android_workaround()
|
dest_path=lm.android_workaround(new_dest_path='/data/data/org.xbmc.kodi/lib/')
|
||||||
dll_path=os.path.join(dest_path, 'liblibtorrent.so')
|
dll_path=os.path.join(dest_path, 'liblibtorrent.so')
|
||||||
log('NEW CDLL path = ' + dll_path)
|
log('NEW CDLL path = ' + dll_path)
|
||||||
liblibtorrent=CDLL(dll_path)
|
liblibtorrent=CDLL(dll_path)
|
||||||
log('CDLL = ' + str(liblibtorrent))
|
log('CDLL = ' + str(liblibtorrent))
|
||||||
|
except:
|
||||||
|
# http://i3.kym-cdn.com/photos/images/original/000/531/557/a88.jpg
|
||||||
|
dest_path=lm.android_workaround(new_dest_path=xbmc.translatePath('special://xbmc'))
|
||||||
|
dll_path=os.path.join(dest_path, 'liblibtorrent.so')
|
||||||
|
log('NEW CDLL path = ' + dll_path)
|
||||||
|
liblibtorrent=CDLL(dll_path)
|
||||||
|
log('CDLL = ' + str(liblibtorrent))
|
||||||
|
liblibtorrent=CDLL(dll_path)
|
||||||
|
log('CDLL = ' + str(liblibtorrent))
|
||||||
path_list = [dest_path]
|
path_list = [dest_path]
|
||||||
log('path_list = ' + str(path_list))
|
log('path_list = ' + str(path_list))
|
||||||
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
fp, pathname, description = imp.find_module('libtorrent', path_list)
|
||||||
|
|
|
@ -75,8 +75,7 @@ class LibraryManager():
|
||||||
xbmcvfs.copy(os.path.join(self.dest_path, 'libtorrent.so'), dest)
|
xbmcvfs.copy(os.path.join(self.dest_path, 'libtorrent.so'), dest)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def android_workaround(self):
|
def android_workaround(self, new_dest_path):
|
||||||
new_dest_path='/data/data/org.xbmc.kodi/lib/'
|
|
||||||
for libname in get_libname(self.platform):
|
for libname in get_libname(self.platform):
|
||||||
libpath=os.path.join(self.dest_path, libname)
|
libpath=os.path.join(self.dest_path, libname)
|
||||||
size=str(os.path.getsize(libpath))
|
size=str(os.path.getsize(libpath))
|
||||||
|
|
Loading…
Reference in New Issue