Kodi Community Forum

Full Version: How to resync virtual directory
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Xbmc.executeBuiltin() and Container.Refresh should do it for you
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
Use the plugin url which generates the desired new content, for ex:
Code:
plugin://plugin.video.foo/?mode=generateNewContent&my_key=Myvar&foo=bar
it didn't help, i tried to figure it out but seems no luck, i always got the invalid handle error
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