2011-11-14, 13:38
Hi guys,
I hope this doesn't sound like a dumb question. I've done a fair bit of documentation reading and searching before I posted here, I promise.
So, I'm trying to scrape a site that lists episode like this:
- Episode 1
- Episode 2
Each episode links to a blog post with a Vimeo URL embedded in it.
So, I need to get the Vimeo ID for every episode, but I don't want to rape their servers every time someone displays all episodes in my plugin. What I want, is that when somebody clicks on an episode, the script makes a call to get the Vimeo ID and then opens the Vimeo plugin.
Right now I'm trying to do this unsuccessfully with setResolvedUrl:
vimeo_id = get_vimeo_id()
plugin_path = 'plugin://plugin.video.vimeo?action=play_video&videoid=' + vimeo_id
list_item = xbmcgui.ListItem(path=plugin_path)
list_item.setProperty('IsPlayable', 'true')
return xbmcplugin.setResolvedUrl(self.this_plugin, True, list_item)
But, of course, that's not the way setResolvedUrl works.
I know I can call an external plugin with addDirectoryItem but I can't populate the episode lists without the Vimeo ID.
Any advice you can give me friends, would be much appreciated.
Lex
I hope this doesn't sound like a dumb question. I've done a fair bit of documentation reading and searching before I posted here, I promise.
So, I'm trying to scrape a site that lists episode like this:
- Episode 1
- Episode 2
Each episode links to a blog post with a Vimeo URL embedded in it.
So, I need to get the Vimeo ID for every episode, but I don't want to rape their servers every time someone displays all episodes in my plugin. What I want, is that when somebody clicks on an episode, the script makes a call to get the Vimeo ID and then opens the Vimeo plugin.
Right now I'm trying to do this unsuccessfully with setResolvedUrl:
vimeo_id = get_vimeo_id()
plugin_path = 'plugin://plugin.video.vimeo?action=play_video&videoid=' + vimeo_id
list_item = xbmcgui.ListItem(path=plugin_path)
list_item.setProperty('IsPlayable', 'true')
return xbmcplugin.setResolvedUrl(self.this_plugin, True, list_item)
But, of course, that's not the way setResolvedUrl works.
I know I can call an external plugin with addDirectoryItem but I can't populate the episode lists without the Vimeo ID.
Any advice you can give me friends, would be much appreciated.
Lex