replace runscript controlcenter with import

pull/15/head
Kingul 2016-12-04 12:03:44 +02:00
parent 49dc49cd6b
commit 0757968528
1 changed files with 5 additions and 8 deletions

View File

@ -366,11 +366,8 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
url = self.form_link(action, link) url = self.form_link(action, link)
xbmc.executebuiltin('xbmc.RunPlugin("%s")' % (url)) xbmc.executebuiltin('xbmc.RunPlugin("%s")' % (url))
elif mode == 'history_search_item': elif mode == 'history_search_item':
addtime = params.get('addtime') params['title'] = params.get('filename')
url = (os.path.join(__root__, 'controlcenter.py,') + self.controlCenter(params)
'addtime=%s&title=%s' % (str(addtime), urllib.quote_plus(filename)))
log(url)
xbmc.executebuiltin('xbmc.RunScript(%s)' % (url))
def right_press4(self): def right_press4(self):
item = self.listing.getSelectedItem() item = self.listing.getSelectedItem()
@ -430,9 +427,9 @@ class SearchWindow(pyxbmct.AddonDialogWindow):
return url return url
def controlCenter(self): def controlCenter(self, params={}):
xbmc.executebuiltin( import controlcenter
'xbmc.RunScript(%s,)' % os.path.join(__root__, 'controlcenter.py')) controlcenter.main(params)
def reconnect(self, event, callable): def reconnect(self, event, callable):
self.disconnect(event) self.disconnect(event)