hack for context menu not showing every time

pull/15/head
Kingul 2016-11-21 19:23:37 +02:00
parent 4ee1b5bf9b
commit c7f9f54fb0
1 changed files with 3 additions and 3 deletions

View File

@ -1148,14 +1148,14 @@ class Core:
contextMenu = [(self.localize('Search Control Window'), contextMenu = [(self.localize('Search Control Window'),
'xbmc.RunScript(%s,)' % os.path.join(ROOT, 'controlcenter.py'))] 'xbmc.RunScript(%s,)' % os.path.join(ROOT, 'controlcenter.py'))]
replaceMenu = False replaceMenu = False
if contextMenu:
listitem.addContextMenuItems(contextMenu, replaceItems=replaceMenu)
if isFolder: if isFolder:
listitem.setProperty("Folder", "true") listitem.setProperty("Folder", "true")
listitem.setInfo(type='Video', infoLabels=info) listitem.setInfo(type='Video', infoLabels=info)
else: else:
listitem.setInfo(type='Video', infoLabels=info) listitem.setInfo(type='Video', infoLabels=info)
listitem.setArt({'thumb': image}) listitem.setArt({'thumb': image})
if contextMenu:
listitem.addContextMenuItems(contextMenu, replaceItems=replaceMenu)
xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, listitem=listitem, isFolder=isFolder) xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]), url=url, listitem=listitem, isFolder=isFolder)
def getParameters(self, parameterString): def getParameters(self, parameterString):
@ -1694,7 +1694,7 @@ class Core:
def context(self, params={}): def context(self, params={}):
xbmc.executebuiltin("Action(ContextMenu)") xbmc.executebuiltin("Action(ContextMenu)")
return sys.exit()
def downloadFilesList(self, params={}): def downloadFilesList(self, params={}):
from resources.utorrent.net import Download from resources.utorrent.net import Download