How to resync virtual directory
#1
Exclamation 
Hi guys,

I'm currently working on xmbc plugins, try to get content from some sites, and display it using virtual directory, in my script i turn on the cache solution and everything works fine now. But now i'm facing the problem to live reload all categories, so i added a context menu to call external script to reload it, but don't know how to replace with the new content. I tried to call xbmcplugin.addDirectoryItem again but without success.

Anyone has any idea how to do it?

Thanks

Billy
Reply
#2
Xbmc.executeBuiltin() and Container.Refresh should do it for you
Reply
#3
Thank for your help but it didn't work coz the path is not real system dir so refresh wont effect anything. As i understand i must remove all item in the current container, add new item then refresh the container.
But i cant see anywhere build-in command allow me to clean up container
Reply
#4
Use the plugin url which generates the desired new content, for ex:
Code:
plugin://plugin.video.foo/?mode=generateNewContent&my_key=Myvar&foo=bar
Reply
#5
it didn't help, i tried to figure it out but seems no luck, i always got the invalid handle error
Reply
#6
I'm sorry, I was wrong, it's Container.Update
This is what I'm using:
Code:
url = 'plugin://plugin.video.foo/?mode=generateNewContent&my_key=Myvar&foo=bar'
builtin = 'Container.Update(%s)' %url
xbmc.executebuiltin(builtin)

Also, this is more of a subject for the Python Development section
Reply

Logout Mark Read Team Forum Stats Members Help
How to resync virtual directory0