From 178111a1f5036d6afa891c9a1ced018aa4a9d90c Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Wed, 18 Jan 2017 18:56:25 +0300 Subject: [PATCH] 32bit possible auto --- addon.xml | 2 +- python_libtorrent/platform_pulsar.py | 9 ++++++--- python_libtorrent/python_libtorrent/__init__.py | 7 +++---- python_libtorrent/python_libtorrent/functions.py | 2 ++ python_libtorrent/python_libtorrent/platform_pulsar.py | 9 ++++++--- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/addon.xml b/addon.xml index 7e213bc..f2dfeb5 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/python_libtorrent/platform_pulsar.py b/python_libtorrent/platform_pulsar.py index a44c899..097ac97 100644 --- a/python_libtorrent/platform_pulsar.py +++ b/python_libtorrent/platform_pulsar.py @@ -136,10 +136,13 @@ def get_platform(): else: ret["arch"] = 'mipsel_ucs2' elif "aarch64" in uname: - if sys.maxunicode > 65536: - ret["arch"] = 'aarch64_ucs4' + if sys.maxint > 2147483647: #is_64bit_system + if sys.maxunicode > 65536: + ret["arch"] = 'aarch64_ucs4' + else: + ret["arch"] = 'aarch64_ucs2' else: - ret["arch"] = 'aarch64_ucs2' + ret["arch"] = "armv7" #32-bit userspace elif xbmc.getCondVisibility("system.platform.windows"): ret["os"] = "windows" elif xbmc.getCondVisibility("system.platform.osx"): diff --git a/python_libtorrent/python_libtorrent/__init__.py b/python_libtorrent/python_libtorrent/__init__.py index 2ee0ad2..5be1b5b 100644 --- a/python_libtorrent/python_libtorrent/__init__.py +++ b/python_libtorrent/python_libtorrent/__init__.py @@ -89,10 +89,9 @@ if __settings__.getSetting('plugin_name')!=__plugin__: log('platform: ' + str(platform)) if platform['system'] not in ['windows']: log('os: '+str(os.uname())) - if sys.maxunicode > 65536: - log('ucs4') - else: - log('ucs2') + log_text = 'ucs4' if sys.maxunicode > 65536 else 'ucs2' + log_text += ' x64' if sys.maxint > 2147483647 else ' x86' + log(log_text) try: if platform['system'] in ['linux_x86', 'windows', 'linux_armv6', 'linux_armv7', diff --git a/python_libtorrent/python_libtorrent/functions.py b/python_libtorrent/python_libtorrent/functions.py index 7c5e21e..3cc44cc 100644 --- a/python_libtorrent/python_libtorrent/functions.py +++ b/python_libtorrent/python_libtorrent/functions.py @@ -108,6 +108,8 @@ class LibraryManager(): if not xbmcvfs.exists(new_libpath): xbmcvfs.copy(libpath, new_libpath) log('Copied %s -> %s' %(libpath, new_libpath)) + if not xbmcvfs.exists(new_libpath): + log('Failed!') else: new_size=str(os.path.getsize(new_libpath)) if size!=new_size: diff --git a/python_libtorrent/python_libtorrent/platform_pulsar.py b/python_libtorrent/python_libtorrent/platform_pulsar.py index a44c899..097ac97 100644 --- a/python_libtorrent/python_libtorrent/platform_pulsar.py +++ b/python_libtorrent/python_libtorrent/platform_pulsar.py @@ -136,10 +136,13 @@ def get_platform(): else: ret["arch"] = 'mipsel_ucs2' elif "aarch64" in uname: - if sys.maxunicode > 65536: - ret["arch"] = 'aarch64_ucs4' + if sys.maxint > 2147483647: #is_64bit_system + if sys.maxunicode > 65536: + ret["arch"] = 'aarch64_ucs4' + else: + ret["arch"] = 'aarch64_ucs2' else: - ret["arch"] = 'aarch64_ucs2' + ret["arch"] = "armv7" #32-bit userspace elif xbmc.getCondVisibility("system.platform.windows"): ret["os"] = "windows" elif xbmc.getCondVisibility("system.platform.osx"):