PythonScript Problem with XBMC 9.04
#1
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:
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
Reply
#2
A functional, bare-minimum script that exhibits the behavior is way more likely to get dev attention than a just function and making them work at reproducing.
Reply
#3
Here you go: http://pastie.org/480219

Its not playing files but it shows the point
Reply
#4
On XBMC 9.04 (r19952) on Windows:

Show title too
Doesnt show correct Title
Show title

Looks correct to me...
Reply
#5
Sorry, i just found out that it only happens in Database-Mode.

Starting XBMC, Platform: Windows Vista, 32-bit Service Pack 1 build 6001. Built on May 5 2009 (SVN:19952, compiler 1500)
Reply
#6
I take it the "database mode" is the "library mode" - sorry, I don't use that much, in my configuration here seems that the button is even disabled, so I'll let someone else to take it from here...
Reply
#7
so can at least someone confirm the bug?
i love the library mode but its annoying switchig the modes all the time^^
Reply

Logout Mark Read Team Forum Stats Members Help
PythonScript Problem with XBMC 9.040