diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8d340ac..34928eb 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,7 +1,11 @@ - + + + + + @@ -18,7 +22,7 @@ - + @@ -30,7 +34,85 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -44,6 +126,10 @@ @@ -104,8 +190,130 @@ + + + + + + + + + + + + + @@ -157,21 +365,21 @@ - - - + + - + - - + + - + + @@ -203,10 +411,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Core.py b/Core.py index 203b929..8f55772 100644 --- a/Core.py +++ b/Core.py @@ -1464,18 +1464,21 @@ class Core: dirid = 0 if dirid == -1: return dirname = clean[dirid] - elif self.__settings__.getSetting("torrent") == '1': + if self.__settings__.getSetting("torrent") == '1': + default = self.__settings__.getSetting("torrent_dir") + keyboard = xbmc.Keyboard(default, self.localize('Save to path') + ':') + keyboard.doModal() + dirname = keyboard.getText() + if not keyboard.isConfirmed(): + return + if not dirname and len(clean)>0: dirname = clean[0] else: dirname = self.__settings__.getSetting("torrent_dir") get = params.get url = urllib.unquote_plus(get("url")) - ind = None - try: - ind = get("ind") - except: - pass + ind = get("ind") if not ind: self.__settings__.setSetting("lastTorrentUrl", url) classMatch = re.search('(\w+)::(.+)', url) @@ -1486,8 +1489,7 @@ class Core: try: searcherObject = getattr(__import__(searcher), searcher)() except Exception, e: - print 'Unable to use searcher: ' + searcher + ' at ' + self.__plugin__ + ' openTorrent(). Exception: ' + str( - e) + print 'Unable to use searcher: ' + searcher + ' at ' + self.__plugin__ + ' openTorrent(). Exception: ' + str(e) return url = searcherObject.getTorrentFile(classMatch.group(2)) diff --git a/Localization.py b/Localization.py index 415986b..8ebe854 100644 --- a/Localization.py +++ b/Localization.py @@ -195,7 +195,8 @@ dictionary = { 'Individual Tracker Options':'Выбор Трекеров', 'Downloading and copy subtitles. Please wait.':'Скачиваю и копирую субтитры. Пожалуйста подождите.', 'International Check - First Run':'International Check - Первый запуск', - 'Delete Russian stuff?':'Удалить русские трекеры?' + 'Delete Russian stuff?':'Удалить русские трекеры?', + 'Save to path':'Сохранить в папку', } } diff --git a/resources/searchers/KickAssSo.py b/resources/searchers/KickAssSo.py index 42d137e..566f96a 100644 --- a/resources/searchers/KickAssSo.py +++ b/resources/searchers/KickAssSo.py @@ -86,7 +86,7 @@ class KickAssSo(SearcherABC.SearcherABC): leechers = item.find('{%s}peers' % torrent).text link = item.find('enclosure').attrib['url'] image = sys.modules["__main__"].__root__ + self.searchIcon - print link + #print link filesList.append(( int(int(self.sourceWeight) * int(seeds)), int(seeds), int(leechers), size, diff --git a/resources/settings.xml b/resources/settings.xml index 81b3298..c0534eb 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -106,7 +106,7 @@ - +