diff --git a/.idea/workspace.xml b/.idea/workspace.xml index dc1b0df..f55bfd5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,6 +2,12 @@ + + + + + + @@ -37,49 +43,9 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -88,19 +54,11 @@ - - - - - - - - - - - - - + + + + + @@ -149,22 +107,25 @@ - - + + - + + + + @@ -225,12 +186,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -240,7 +255,7 @@ - + @@ -250,6 +265,13 @@ + + + @@ -261,8 +283,6 @@ @@ -346,7 +368,6 @@ - @@ -394,12 +415,35 @@ + @@ -416,6 +460,9 @@ + + + @@ -579,18 +626,6 @@ @@ -898,20 +945,20 @@ - + - - + + @@ -934,7 +981,6 @@ - @@ -959,7 +1005,8 @@ - @@ -968,17 +1015,164 @@ - + - - + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1059,13 +1253,6 @@ - - - - - - - @@ -1248,13 +1435,6 @@ - - - - - - - @@ -1302,106 +1482,67 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - + + + + @@ -1462,12 +1603,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core.py b/Core.py index 38fcc71..48bcbb3 100644 --- a/Core.py +++ b/Core.py @@ -70,18 +70,18 @@ class Core: def __init__(self): if 0 == len(self.userStorageDirectory): - try: - temp_dir = tempfile.gettempdir() - except: - if not self.platform['system']=='android': - temp_dir = tempdir() - else: - dialog=xbmcgui.Dialog() - dialog.ok(self.localize('Android Support'), - self.localize('Android has no temprorary folder'), - self.localize('Please specify storage folder in Settings!')) - self.__settings__.openSettings() - temp_dir = file_encode(self.__settings__.getSetting("storage")) + try: + temp_dir = tempfile.gettempdir() + except: + if not self.platform['system']=='android': + temp_dir = tempdir() + else: + dialog=xbmcgui.Dialog() + dialog.ok(self.localize('Android Support'), + self.localize('Android has no temprorary folder'), + self.localize('Please specify storage folder in Settings!')) + self.__settings__.openSettings() + temp_dir = file_encode(self.__settings__.getSetting("storage")) else: temp_dir = self.userStorageDirectory @@ -91,6 +91,7 @@ class Core: if self.__settings__.getSetting('plugin_name')!=self.__plugin__: if self.__plugin__ == 'Torrenter v.2.3.1': first_run_230(self.__settings__.getSetting('delete_russian')=='true') + first_run_231() if self.__settings__.getSetting('delete_russian')!='false': not_russian=delete_russian(ok=self.__settings__.getSetting('delete_russian')=='true', action='delete') if not_russian: diff --git a/Libtorrent.py b/Libtorrent.py index 89e4193..0a2e339 100644 --- a/Libtorrent.py +++ b/Libtorrent.py @@ -32,9 +32,8 @@ import xbmc import xbmcgui import xbmcvfs import Localization -from platform_pulsar import get_platform from functions import file_decode, file_encode, isSubtitle, DownloadDB -from ctypes import * +from platform_pulsar import get_platform class Libtorrent: diff --git a/addon.xml b/addon.xml index 1f8ffb6..74553bf 100644 --- a/addon.xml +++ b/addon.xml @@ -1,5 +1,5 @@  - + diff --git a/changelog.txt b/changelog.txt index 0b7abab..33eeb5e 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,6 +1,7 @@ [B]Version 2.3.1[/B] [+] Загрузка: Исправлена ошибка удаления базы данных [+] Списки Медиа: Исправлен IMDB TOP 250 +[+] Проигрыватель: Добавлена поддержка Android ARM [B]Version 2.3.0[/B] [+] Поиск: Поиск существенно ускорился, стал многопоточным (пока 3 потока одновременно) diff --git a/functions.py b/functions.py index a5b8eca..2f938df 100644 --- a/functions.py +++ b/functions.py @@ -1767,12 +1767,18 @@ def get_ids_video(contentList): def first_run_230(delete_russian): - ok = xbmcgui.Dialog().ok('< %s >' % Localization.localize('Torrenter Update 2.3.0'), - Localization.localize('I added custom searchers to Torrenter v2!'), - Localization.localize('Now you can use your login on trackers or write and install your own searcher!')) - if not delete_russian: - yes=xbmcgui.Dialog().yesno('< %s >' % Localization.localize('Torrenter Update 2.3.0'), - Localization.localize('Would you like to install %s from "MyShows.me Kodi Repo" in Programs section?') % 'RuTrackerOrg', - Localization.localize('Open installation window?')) - if yes: - xbmc.executebuiltin('XBMC.ActivateWindow(Addonbrowser,addons://search/%s)' % ('Torrenter Searcher')) + if not __settings__.getSetting('first_run_230')=='True': + __settings__.setSetting('first_run_230','True') + if not delete_russian: + yes=xbmcgui.Dialog().yesno('< %s >' % Localization.localize('Torrenter Update 2.3.0'), + Localization.localize('Would you like to install %s from "MyShows.me Kodi Repo" in Programs section?') % 'RuTrackerOrg', + Localization.localize('Open installation window?')) + if yes: + xbmc.executebuiltin('XBMC.ActivateWindow(Addonbrowser,addons://search/%s)' % ('Torrenter Searcher')) + +def first_run_231(): + if not __settings__.getSetting('first_run_231')=='True': + __settings__.setSetting('first_run_231','True') + ok = xbmcgui.Dialog().ok('< %s >' % Localization.localize('Torrenter Update 2.3.1'), + Localization.localize('I added custom searchers to Torrenter v2!'), + Localization.localize('Now you can use your login on trackers or write and install your own searcher!')) diff --git a/platform_pulsar.py b/platform_pulsar.py deleted file mode 100644 index 3673c46..0000000 --- a/platform_pulsar.py +++ /dev/null @@ -1,81 +0,0 @@ -# -*- coding: utf-8 -*- -''' - Torrenter v2 plugin for XBMC/Kodi - Copyright (C) 2012-2015 Vadim Skorba v1 - DiMartino v2 - http://forum.kodi.tv/showthread.php?tid=214366 - - 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 . -''' -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/resources/searchers/RuTrackerOrg.py b/resources/searchers/unused/RuTrackerOrg.py similarity index 100% rename from resources/searchers/RuTrackerOrg.py rename to resources/searchers/unused/RuTrackerOrg.py