2009-06-06, 00:13
Hi,
This is my first real try at writing a video plugin and I'm running into an odd behavior. Please see the example script below which is stripped down to show exactly the issue. If I run this plugin with Library mode off I get (as expected) a list of:
Test Name 1
Test Name 2
Test Name 3
Test Name 4
If I then switch Library Mode on I get a listing of:
Test Name 3
Test Name 4
tuner0
tuner1
For some reason with Library Mode on it is pulling the tuner number out of the HDHomeRun url and using it as the title. Can someone please explain why or test and see if you get the same results.
FYI: I'm testing this with XBMC 9.04.1 under Linux
default.py:
This is my first real try at writing a video plugin and I'm running into an odd behavior. Please see the example script below which is stripped down to show exactly the issue. If I run this plugin with Library mode off I get (as expected) a list of:
Test Name 1
Test Name 2
Test Name 3
Test Name 4
If I then switch Library Mode on I get a listing of:
Test Name 3
Test Name 4
tuner0
tuner1
For some reason with Library Mode on it is pulling the tuner number out of the HDHomeRun url and using it as the title. Can someone please explain why or test and see if you get the same results.
FYI: I'm testing this with XBMC 9.04.1 under Linux
default.py:
Code:
import urllib,urllib2,re,xbmcplugin,xbmcgui
def addLink(name,url,iconimage):
ok=True
liz=xbmcgui.ListItem(name, "", "DefaultVideo.png", iconimage)
liz.setInfo( "Video", { "Title": name } )
ok=xbmcplugin.addDirectoryItem(handle=int(sys.argv[1]),url=url,listitem=liz)
return ok
addLink("Test Name 1","hdhomerun://10160469/tuner0?channel=qam256:627000000&program=2","")
addLink("Test Name 2","hdhomerun://10160469/tuner1?channel=qam256:627000000&program=40","")
addLink("Test Name 3","file://random1","")
addLink("Test Name 4","file://random2","")
xbmcplugin.endOfDirectory(int(sys.argv[1]))