2013-09-13, 00:56
my plugin is like this
When i first time enter into plugin, i execute showVideoIndex(0) and all is working; a video appear a list of five items
When I click on one item, the plugin is reloaded, but my pluginPid is set to -1, so when i use this pid in addDirectory, i got an "invalid handler -1" error
What can I do to diagnose and/or fix it?
Code:
pluginPid = int(sys.argv[1])
print "JWORG pluginPid " + str(pluginPid)
...
def showVideoIndex(start):
global pluginPid
...
for ....
.....
params = {"content_type" : "video", "start" : next_start}
url = sys.argv[0] + '?' + urllib.urlencode(params)
xbmcplugin.addDirectoryItem(pluginPid, url,listItem)
xbmcplugin.endOfDirectory(pluginPid)
# Stampo per debug gli argomenti della chiamata
params = urlparse.parse_qs((sys.argv[2])[1:])
content_type = params["content_type"][0]
start = 0
try:
start = params["start"][0]
except:
pass
if content_type == "video" :
showVideoIndex(start);
When i first time enter into plugin, i execute showVideoIndex(0) and all is working; a video appear a list of five items
When I click on one item, the plugin is reloaded, but my pluginPid is set to -1, so when i use this pid in addDirectory, i got an "invalid handler -1" error
What can I do to diagnose and/or fix it?