help with refreshing a list of dirs
#1
I have couple of question as I develop my first video plugin

I have python add that scrapes an HTML page with a list of videos and then does a addDirectory. I also add a special dir called "Refresh" that would refresh the list above to re-getting and parsing the file and updating the page with results. But this creates another folder which now means I need to click the ".." item twiice to get out of the plugin

also is it possible to play a stream using xbmc.Player.play()? without adding a link to a directory? is there some special parameters passed when a video is stopped and control is passed back to the plugin that I can detect? I can only play the stream by adding a non-folder directory which means I now have extra screen with just link in it.

This what I want to achive, this is what I have
HOME -> List of events (isFolder=true because I need to a call just before playing since the streamURL is time dependant) , clicking on the list of games calls some python and streams an event.

Start->List of Events->Screen 1 with link with the stream-> click again to play

I know this might no make sense but is the best I can explain at the moment.


Reply
#2
just did some more searching, and found using the player is not a good idea, so scratch that. but i guess I still have a question about refreshing a list and remaining on the same screen.
Reply
#3
Instead of using "isFolder = true", because you don't want another directory, you can setProperty (isPlayable) on the list item. Something like this -
Code:
liz=xbmcgui.ListItem(title, iconImage="DefaultFolder.png", thumbnailImage=iconimage)
liz.setProperty('IsPlayable', 'true')

Then have that item run the function to resolve the real playback url and use setResolvedUrl. http://mirrors.xbmc.org/docs/python-docs...esolvedUrl
Code:
item = xbmcgui.ListItem(path=url)
xbmcplugin.setResolvedUrl(int(sys.argv[1]), True, item)
Reply

Logout Mark Read Team Forum Stats Members Help
help with refreshing a list of dirs0