commit 06204dcd9cdd827e398a74b7fda04e3f469c29fe Author: DiMartinoXBMC Date: Sun Jun 28 14:40:33 2015 +0300 Initial commit diff --git a/addon.xml b/addon.xml new file mode 100644 index 0000000..d0fbbfd --- /dev/null +++ b/addon.xml @@ -0,0 +1,15 @@ + + + + + + + executable + + + all + LibTorrent + + + + diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..86a6297 --- /dev/null +++ b/changelog.txt @@ -0,0 +1,2 @@ +0.6.10b: +Windows update to 0.6.18 \ No newline at end of file diff --git a/icon.png b/icon.png new file mode 100644 index 0000000..5d2eaed Binary files /dev/null and b/icon.png differ diff --git a/python_libtorrent/__init__.py b/python_libtorrent/__init__.py new file mode 100644 index 0000000..e788b41 --- /dev/null +++ b/python_libtorrent/__init__.py @@ -0,0 +1,37 @@ +#-*- coding: utf-8 -*- +''' + Torrenter v2 plugin for XBMC/Kodi + Copyright (C) 2012-2015 Vadim Skorba - DiMartino +''' + +from platform_pulsar import get_platform + +platform = get_platform() + +print '[script.module.libtorrent]: platform ' + str(platform) + +try: + import libtorrent + + print '[script.module.libtorrent]: Imported libtorrent v' + libtorrent.version + ' from system' +except Exception, e: + print '[script.module.libtorrent]: Error importing from system. Exception: ' + str(e) + + try: + #dirname = os.path.join(xbmc.translatePath('special://home'), 'addons', 'script.module.libtorrent', + # 'python_libtorrent', platform['system']) + #sys.path.insert(0, dirname) + if platform['system'] == 'darwin': + from darwin.libtorrent import * + elif platform['system'] == 'linux_x86': + from linux_x86.libtorrent import * + elif platform['system'] == 'linux_x86_64': + from linux_x86_64.libtorrent import * + elif platform['system'] == 'windows': + from windows.libtorrent import * + + #print '[script.module.libtorrent]: Imported libtorrent v' + libtorrent.version + ' from python_libtorrent.' + platform[ + # 'system'] + except Exception, e: + print '[script.module.libtorrent]: Error importing python_libtorrent.' + platform['system'] + '. Exception: ' + str(e) + pass \ No newline at end of file diff --git a/python_libtorrent/darwin/__init__.py b/python_libtorrent/darwin/__init__.py new file mode 100644 index 0000000..f1c76b5 --- /dev/null +++ b/python_libtorrent/darwin/__init__.py @@ -0,0 +1,19 @@ +#-*- coding: utf-8 -*- +''' + Torrenter plugin for XBMC + Copyright (C) 2012 Vadim Skorba + vadim.skorba@gmail.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +''' diff --git a/python_libtorrent/darwin/libtorrent.so b/python_libtorrent/darwin/libtorrent.so new file mode 100644 index 0000000..0ce2183 Binary files /dev/null and b/python_libtorrent/darwin/libtorrent.so differ diff --git a/python_libtorrent/linux_x86/__init__.py b/python_libtorrent/linux_x86/__init__.py new file mode 100644 index 0000000..f1c76b5 --- /dev/null +++ b/python_libtorrent/linux_x86/__init__.py @@ -0,0 +1,19 @@ +#-*- coding: utf-8 -*- +''' + Torrenter plugin for XBMC + Copyright (C) 2012 Vadim Skorba + vadim.skorba@gmail.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +''' diff --git a/python_libtorrent/linux_x86/libtorrent.so b/python_libtorrent/linux_x86/libtorrent.so new file mode 100644 index 0000000..62445a7 Binary files /dev/null and b/python_libtorrent/linux_x86/libtorrent.so differ diff --git a/python_libtorrent/linux_x86_64/__init__.py b/python_libtorrent/linux_x86_64/__init__.py new file mode 100644 index 0000000..f1c76b5 --- /dev/null +++ b/python_libtorrent/linux_x86_64/__init__.py @@ -0,0 +1,19 @@ +#-*- coding: utf-8 -*- +''' + Torrenter plugin for XBMC + Copyright (C) 2012 Vadim Skorba + vadim.skorba@gmail.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +''' diff --git a/python_libtorrent/platform_pulsar.py b/python_libtorrent/platform_pulsar.py new file mode 100644 index 0000000..a3bac6c --- /dev/null +++ b/python_libtorrent/platform_pulsar.py @@ -0,0 +1,62 @@ +import sys +import os + +import xbmc + + +def get_platform(): + ret = { + "arch": sys.maxsize > 2 ** 32 and "x64" or "x86", + } + if xbmc.getCondVisibility("system.platform.android"): + ret["os"] = "android" + if "arm" in os.uname()[4]: + ret["arch"] = "arm" + elif xbmc.getCondVisibility("system.platform.linux"): + ret["os"] = "linux" + if "arm" in os.uname()[4]: + ret["arch"] = "arm" + elif xbmc.getCondVisibility("system.platform.xbox"): + system_platform = "xbox" + ret["arch"] = "" + elif xbmc.getCondVisibility("system.platform.windows"): + ret["os"] = "windows" + elif xbmc.getCondVisibility("system.platform.osx"): + ret["os"] = "darwin" + elif xbmc.getCondVisibility("system.platform.ios"): + ret["os"] = "ios" + ret["arch"] = "arm" + + ret["system"] = '' + ret["message"] = ['', ''] + + if ret["os"] == 'windows': + ret["system"] = 'windows' + ret["message"] = ['Windows has static compiled python-libtorrent included.', + 'You should install "script.module.libtorrent" from "MyShows.me Kodi Repo"'] + elif ret["os"] == "linux" and ret["arch"] == "x64": + ret["system"] = 'linux_x86_64' + ret["message"] = ['Linux x64 has not static compiled python-libtorrent included.', + 'You should install it by "sudo apt-get install python-libtorrent"'] + elif ret["os"] == "linux" and ret["arch"] == "x86": + 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 ret["arch"] == "arm": + ret["system"] = 'linux_arm' + 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.'] + elif ret["os"] == "android": + ret["system"] = 'android' + ret["message"] = ['Please use install Ace Stream APK and choose it in Settings.', + 'It is possible to compile python-libtorrent for Android, but I don\'t know how.'] + elif ret["os"] == "darwin": + ret["system"] = 'darwin' + ret["message"] = ['It is possible to compile python-libtorrent for OS X.', + 'But you would have to do it by yourself, there is some info on github.com.'] + elif ret["os"] == "ios": + ret["system"] = 'ios' + ret["message"] = ['It is NOT possible to compile python-libtorrent for iOS.', + 'But you can use torrent-client control functions.'] + + return ret \ No newline at end of file diff --git a/python_libtorrent/windows/__init__.py b/python_libtorrent/windows/__init__.py new file mode 100644 index 0000000..f1c76b5 --- /dev/null +++ b/python_libtorrent/windows/__init__.py @@ -0,0 +1,19 @@ +#-*- coding: utf-8 -*- +''' + Torrenter plugin for XBMC + Copyright (C) 2012 Vadim Skorba + vadim.skorba@gmail.com + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +''' diff --git a/python_libtorrent/windows/libtorrent.pyd b/python_libtorrent/windows/libtorrent.pyd new file mode 100644 index 0000000..6c0776f Binary files /dev/null and b/python_libtorrent/windows/libtorrent.pyd differ diff --git a/resources/language/english/strings.xml b/resources/language/english/strings.xml new file mode 100644 index 0000000..e2903a0 --- /dev/null +++ b/resources/language/english/strings.xml @@ -0,0 +1,31 @@ + + + Initialization + Connecting + Waiting + Sending Data + Receiving link + Playing + Cancel + + Pre-buffering + Buffering + Downloading + Verifying data + TS Engine Idling + TS Engine Waiting + + Seeds: %s Speed: %s + Seconds %s' + + TS Engine not running! + No answer + Error torrent loading + Timeout + + Server Address + AutoPausing + AutoClose tsengine + Show Buffering Status + + \ No newline at end of file diff --git a/resources/language/russian/strings.xml b/resources/language/russian/strings.xml new file mode 100644 index 0000000..072603b --- /dev/null +++ b/resources/language/russian/strings.xml @@ -0,0 +1,30 @@ + + + Инициализация + Соединение + Жду ответа + Передаю данные + Получаю ссылку + Начинаю воспроизведение + Отмена + + Предварительная буферизация + Буферизация + Скачивание + Проверка + TS Engine бездействует + TS Engine ожидает + + Пиры:%s Скорость:%s + Секунд %ы' + + TS Engine не запущен! + Нет ответа + Ошибка загрузки торрента + Не дождался ссылки для воспроизведения + + Адрес сервера + Использовать автопаузу + Автозакрытие tsengine + Показывать уведомления о буферизации + \ No newline at end of file diff --git a/resources/settings.xml b/resources/settings.xml new file mode 100644 index 0000000..d36934e --- /dev/null +++ b/resources/settings.xml @@ -0,0 +1,5 @@ + + + + +