pull/1/head
DiMartinoXBMC 2015-08-29 17:18:25 +03:00
parent 84c42525a0
commit 39ca8cc9b6
2 changed files with 7 additions and 3 deletions

View File

@ -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:

View File

@ -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)