From 39ca8cc9b6bd73add3ac04fac2c5e34b8053a08e Mon Sep 17 00:00:00 2001 From: DiMartinoXBMC Date: Sat, 29 Aug 2015 17:18:25 +0300 Subject: [PATCH] temp fix --- Core.py | 7 ++++++- SearcherABC.py | 3 +-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Core.py b/Core.py index a7c2a68..6184937 100644 --- a/Core.py +++ b/Core.py @@ -1702,12 +1702,17 @@ class Core: defaultKeyword = params.get('url') showKey=params.get('showKey') + external = unquote(params.get("external"), None) + if external and not params.get('from_searcher'): + searcher = '[%s] ' % str(external) + else: + searcher = '' if showKey == "true" or defaultKeyword == '' or not defaultKeyword: if not defaultKeyword: defaultKeyword = '' defaultKeyword=unquote(defaultKeyword) - keyboard = xbmc.Keyboard(defaultKeyword, self.localize('Search Phrase') + ':') + keyboard = xbmc.Keyboard(defaultKeyword, '%s%s:' % (searcher, self.localize('Search Phrase'))) keyboard.doModal() query = keyboard.getText() if not query: diff --git a/SearcherABC.py b/SearcherABC.py index 22807cd..4b138dc 100644 --- a/SearcherABC.py +++ b/SearcherABC.py @@ -154,11 +154,10 @@ class SearcherABC: return response def askCaptcha(self, url): - temp_dir = tempfile.gettempdir() + temp_dir = self.tempdir() if isinstance(temp_dir, list): temp_dir = temp_dir[0] urllib.URLopener().retrieve(url, temp_dir + '/captcha.png') window = xbmcgui.Window(xbmcgui.getCurrentWindowId()) - temp_dir = tempfile.gettempdir() if isinstance(temp_dir, list): temp_dir = temp_dir[0] image = xbmcgui.ControlImage(460, 20, 360, 160, temp_dir + '/captcha.png') window.addControl(image)