2009-05-16, 19:54
Hio,
u maybe know the widely used functions AddLink and AddDir.
I made a function called AddRedirect, its requests an url, searches for the videofile in the urls source and then plays it.
Everything worked fine till i updated to 9.04.
Now the Captions of the Listitems created by AddRedirect() are always set to the plugins DirectoryName. I wonder why. Rest still works fine.
Here the snippet:
If i change "isFolder=False" to "isFolder=True" captions work fine again. But the video plays in an infinite loop.
Someone able to help?
Thanks!
Keydon
u maybe know the widely used functions AddLink and AddDir.
I made a function called AddRedirect, its requests an url, searches for the videofile in the urls source and then plays it.
Everything worked fine till i updated to 9.04.
Now the Captions of the Listitems created by AddRedirect() are always set to the plugins DirectoryName. I wonder why. Rest still works fine.
Here the snippet:
Code:
def addRedirect(name,url,iconimage):
print "addRedirect(name="+name+", url="+url+", icon="+iconimage+")"
ok=True
liz=xbmcgui.ListItem(name, name, "DefaultFolder.png", iconimage)
u=sys.argv[0]+"?url="+urllib.quote_plus(url)+"&mode="+str(6)+"&name="+urllib.quote_plus(name)
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=u,listitem=liz,isFolder=False)
print "addRedirect; returns "+str(ok)
return ok
If i change "isFolder=False" to "isFolder=True" captions work fine again. But the video plays in an infinite loop.
Someone able to help?
Thanks!
Keydon