diff --git a/addon.xml b/addon.xml index e6cc6bb..7faed30 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@ - + diff --git a/changelog.txt b/changelog.txt index 686397c..4fac63d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ 1.0.9: +Added 1.0.9 for Android, Mac, iOS, Unix ARM & mipsel Added 1.0.9 for Windows, Unix x86 & amd64 1.0.8: diff --git a/python_libtorrent/linux_mips/1.0.9/__init__.py b/python_libtorrent/linux_mips/1.0.9/__init__.py new file mode 100644 index 0000000..e0aed70 --- /dev/null +++ b/python_libtorrent/linux_mips/1.0.9/__init__.py @@ -0,0 +1,24 @@ +#-*- coding: utf-8 -*- +''' + python-libtorrent for Kodi (script.module.libtorrent) + Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +''' diff --git a/python_libtorrent/linux_mips/1.0.9/libtorrent.so.size.txt b/python_libtorrent/linux_mips/1.0.9/libtorrent.so.size.txt new file mode 100644 index 0000000..476b9bf --- /dev/null +++ b/python_libtorrent/linux_mips/1.0.9/libtorrent.so.size.txt @@ -0,0 +1 @@ +4598636 \ No newline at end of file diff --git a/python_libtorrent/linux_mips/1.0.9/libtorrent.so.zip b/python_libtorrent/linux_mips/1.0.9/libtorrent.so.zip new file mode 100644 index 0000000..6b84986 Binary files /dev/null and b/python_libtorrent/linux_mips/1.0.9/libtorrent.so.zip differ diff --git a/python_libtorrent/linux_mips/__init__.py b/python_libtorrent/linux_mips/__init__.py new file mode 100644 index 0000000..e0aed70 --- /dev/null +++ b/python_libtorrent/linux_mips/__init__.py @@ -0,0 +1,24 @@ +#-*- coding: utf-8 -*- +''' + python-libtorrent for Kodi (script.module.libtorrent) + Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +''' diff --git a/python_libtorrent/platform_pulsar.py b/python_libtorrent/platform_pulsar.py index bd1baf3..b344442 100644 --- a/python_libtorrent/platform_pulsar.py +++ b/python_libtorrent/platform_pulsar.py @@ -27,12 +27,28 @@ import sys import os try: import xbmc, xbmcaddon + __settings__ = xbmcaddon.Addon(id='script.module.libtorrent') + __version__ = __settings__.getAddonInfo('version') + __plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ except: + __plugin__ = 'script.module.libtorrent' pass +def log(msg): + try: + xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGNOTICE ) + except UnicodeEncodeError: + xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGNOTICE ) + except: + try: + xbmc.log("### [%s]: %s" % (__plugin__,'ERROR LOG',), level=xbmc.LOGNOTICE ) + except: + print msg + def get_libname(platform): libname=[] - if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6', 'linux_armv7', 'linux_x86_64', 'ios_arm']: + if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6', + 'linux_armv7', 'linux_x86_64', 'ios_arm', 'linux_mips']: libname=['libtorrent.so'] elif platform['system'] == 'windows': libname=['libtorrent.pyd'] @@ -48,7 +64,7 @@ def get_platform(): if __settings__.getSetting('custom_system').lower() == "true": system = int(__settings__.getSetting('set_system')) - print 'USE CUSTOM SYSTEM: '+__language__(1100+system) + log('USE CUSTOM SYSTEM: '+__language__(1100+system)) ret={} @@ -82,7 +98,9 @@ def get_platform(): elif system==9: ret["os"] = "ios" ret["arch"] = "arm" - + elif system==10: + ret["os"] = "linux" + ret["arch"] = "mips" else: ret = { @@ -102,6 +120,8 @@ def get_platform(): ret["arch"] = "armv6" else: ret["arch"] = "arm" + elif "mips" in uname: + ret["arch"] = "mips" elif xbmc.getCondVisibility("system.platform.windows"): ret["os"] = "windows" elif xbmc.getCondVisibility("system.platform.osx"): @@ -129,7 +149,7 @@ def get_system(ret): ret["system"] = 'linux_x86' ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.', 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and "arm" in ret["arch"]: + elif ret["os"] == "linux" and ("arm" or "mips" in ret["arch"]): ret["system"] = 'linux_'+ret["arch"] ret["message"] = ['As far as I know you can compile python-libtorrent for ARMv6-7.', 'You should search for "OneEvil\'s OpenELEC libtorrent" or use Ace Stream.'] diff --git a/python_libtorrent/python_libtorrent/__init__.py b/python_libtorrent/python_libtorrent/__init__.py index ae0fee0..9458f6b 100644 --- a/python_libtorrent/python_libtorrent/__init__.py +++ b/python_libtorrent/python_libtorrent/__init__.py @@ -91,7 +91,8 @@ if platform['system'] not in ['windows']: log('os: '+str(os.uname())) try: - if platform['system'] in ['linux_x86', 'windows', 'linux_armv6', 'linux_armv7', 'linux_x86_64']: + if platform['system'] in ['linux_x86', 'windows', 'linux_armv6', 'linux_armv7', + 'linux_x86_64', 'linux_mips']: import libtorrent elif platform['system'] in ['darwin', 'ios_arm']: import imp diff --git a/python_libtorrent/python_libtorrent/platform_pulsar.py b/python_libtorrent/python_libtorrent/platform_pulsar.py index bd1baf3..b344442 100644 --- a/python_libtorrent/python_libtorrent/platform_pulsar.py +++ b/python_libtorrent/python_libtorrent/platform_pulsar.py @@ -27,12 +27,28 @@ import sys import os try: import xbmc, xbmcaddon + __settings__ = xbmcaddon.Addon(id='script.module.libtorrent') + __version__ = __settings__.getAddonInfo('version') + __plugin__ = __settings__.getAddonInfo('name') + " v." + __version__ except: + __plugin__ = 'script.module.libtorrent' pass +def log(msg): + try: + xbmc.log("### [%s]: %s" % (__plugin__,msg,), level=xbmc.LOGNOTICE ) + except UnicodeEncodeError: + xbmc.log("### [%s]: %s" % (__plugin__,msg.encode("utf-8", "ignore"),), level=xbmc.LOGNOTICE ) + except: + try: + xbmc.log("### [%s]: %s" % (__plugin__,'ERROR LOG',), level=xbmc.LOGNOTICE ) + except: + print msg + def get_libname(platform): libname=[] - if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6', 'linux_armv7', 'linux_x86_64', 'ios_arm']: + if platform['system'] in ['darwin', 'linux_x86', 'linux_arm', 'linux_armv6', + 'linux_armv7', 'linux_x86_64', 'ios_arm', 'linux_mips']: libname=['libtorrent.so'] elif platform['system'] == 'windows': libname=['libtorrent.pyd'] @@ -48,7 +64,7 @@ def get_platform(): if __settings__.getSetting('custom_system').lower() == "true": system = int(__settings__.getSetting('set_system')) - print 'USE CUSTOM SYSTEM: '+__language__(1100+system) + log('USE CUSTOM SYSTEM: '+__language__(1100+system)) ret={} @@ -82,7 +98,9 @@ def get_platform(): elif system==9: ret["os"] = "ios" ret["arch"] = "arm" - + elif system==10: + ret["os"] = "linux" + ret["arch"] = "mips" else: ret = { @@ -102,6 +120,8 @@ def get_platform(): ret["arch"] = "armv6" else: ret["arch"] = "arm" + elif "mips" in uname: + ret["arch"] = "mips" elif xbmc.getCondVisibility("system.platform.windows"): ret["os"] = "windows" elif xbmc.getCondVisibility("system.platform.osx"): @@ -129,7 +149,7 @@ def get_system(ret): ret["system"] = 'linux_x86' ret["message"] = ['Linux has static compiled python-libtorrent included but it didn\'t work.', 'You should install it by "sudo apt-get install python-libtorrent"'] - elif ret["os"] == "linux" and "arm" in ret["arch"]: + elif ret["os"] == "linux" and ("arm" or "mips" in ret["arch"]): ret["system"] = 'linux_'+ret["arch"] ret["message"] = ['As far as I know you can compile python-libtorrent for ARMv6-7.', 'You should search for "OneEvil\'s OpenELEC libtorrent" or use Ace Stream.'] diff --git a/resources/language/english/strings.xml b/resources/language/english/strings.xml index 3f119af..f9968df 100644 --- a/resources/language/english/strings.xml +++ b/resources/language/english/strings.xml @@ -13,12 +13,13 @@ Linux 32-bit Linux 64-bit Linux ARM v7 (RPi 2) - Linux ARM v6 (RPi, not ready) + Linux ARM v6 (RPi) Android ARM v7 Android 32-bit OS X - Apple TV2 (not ready) - iOS (not ready) + Apple TV2 + iOS + Linux MIPS 0.16.19 1.0.6