playstrm fix

pull/15/head
DiMartinoXBMC 2016-12-31 17:58:40 +03:00
parent 2421b4d1db
commit aa4bd34d49
3 changed files with 14 additions and 10 deletions

View File

@ -1502,6 +1502,10 @@ class Core:
fileIndex = unquote(get("index"), None) fileIndex = unquote(get("index"), None)
if url: if url:
self.__settings__.setSetting("lastTorrentUrl", url) self.__settings__.setSetting("lastTorrentUrl", url)
classMatch = re.search('(\w+)::(.+)', url)
if classMatch:
searcher = classMatch.group(1)
url = Searchers().downloadWithSearcher(classMatch.group(2), searcher)
torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory) torrent = Downloader.Torrent(self.userStorageDirectory, torrentFilesDirectory=self.torrentFilesDirectory)
self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url)) self.__settings__.setSetting("lastTorrent", torrent.saveTorrent(url))
if fileIndex==None: fileIndex = chooseFile(torrent.getContentList()) if fileIndex==None: fileIndex = chooseFile(torrent.getContentList())

View File

@ -8,7 +8,7 @@
<import addon="script.module.torrent2http"/> <import addon="script.module.torrent2http"/>
<import addon="script.module.pyrrent2http"/> <import addon="script.module.pyrrent2http"/>
<import addon="script.module.chardet" /> <import addon="script.module.chardet" />
<import addon="script.module.pyxbmct" version="1.2.0"/> <import addon="script.module.pyxbmct"/>
</requires> </requires>
<extension point="xbmc.python.pluginsource" provides="video" library="default.py"> <extension point="xbmc.python.pluginsource" provides="video" library="default.py">
<provides>video</provides> <provides>video</provides>

View File

@ -156,14 +156,13 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
def set_navigation(self): def set_navigation(self):
# Top menu # Top menu
self.button_browser.setNavigation(self.listing, self.listing, self.button_downloadstatus, self.button_browser.setNavigation(self.window_close_button, self.listing, self.button_downloadstatus,
self.button_controlcenter) self.button_controlcenter)
self.button_controlcenter.setNavigation(self.listing, self.listing, self.button_browser, self.input_search) self.button_controlcenter.setNavigation(self.window_close_button, self.listing, self.button_browser, self.input_search)
#self.button_keyboard.setNavigation(self.listing, self.listing, self.button_browser, self.input_search) #self.button_keyboard.setNavigation(self.listing, self.listing, self.button_browser, self.input_search)
self.input_search.setNavigation(self.listing, self.listing, self.button_controlcenter, self.button_search) self.input_search.setNavigation(self.window_close_button, self.listing, self.button_controlcenter, self.button_search)
self.button_search.setNavigation(self.listing, self.listing, self.input_search, self.button_history) self.button_search.setNavigation(self.window_close_button, self.listing, self.input_search, self.button_history)
self.button_history.setNavigation(self.listing, self.listing, self.button_search, self.button_watched) self.button_history.setNavigation(self.window_close_button, self.listing, self.button_search, self.button_watched)
self.update_navigation() self.update_navigation()
def update_navigation(self): def update_navigation(self):
@ -173,10 +172,11 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
self.last_right_button = self.navi_right_menu[self.navi['last_right_button'] - 1] self.last_right_button = self.navi_right_menu[self.navi['last_right_button'] - 1]
# Top menu # Top menu
self.button_downloadstatus.setNavigation(self.listing, self.listing, self.last_right_button, self.button_downloadstatus.setNavigation(self.window_close_button, self.listing, self.last_right_button,
self.button_browser) self.button_browser)
self.button_watched.setNavigation(self.listing, self.listing, self.button_history, self.last_right_button) self.button_watched.setNavigation(self.window_close_button, self.listing, self.button_history, self.last_right_button)
self.window_close_button.setNavigation(self.listing, self.last_top_button, self.button_watched,
self.button_downloadstatus)
# Main # Main
self.listing.setNavigation(self.last_top_button, self.input_search, self.button_downloadstatus, self.listing.setNavigation(self.last_top_button, self.input_search, self.button_downloadstatus,
self.last_right_button) self.last_right_button)