Refresh Directory?
#1
Does it exists to refresh directory item urls adresses, or does it exists just remove directory items, I have found addDirectoryItem, but can't found removeHuh
Reply
#2
Plugins work like good old 1995 websites: After they sent the items to XBMC, they stop running - next action has to be taken by the user. So there is no removing because no plugin could trigger it after presenting the items.

There is this, it triggers a refresh:
xbmc.executebuiltin('Container.Refresh')

But this only makes sense in rare cases, e.g. having an item which, after get chosen by the user, does not present new items but calling the refresh instead.
My GitHub. My Add-ons:
Image
Reply
#3
(2015-06-12, 19:42)sphere Wrote: Plugins work like good old 1995 websites: After they sent the items to XBMC, they stop running - next action has to be taken by the user. So there is no removing because no plugin could trigger it after presenting the items.

There is this, it triggers a refresh:
xbmc.executebuiltin('Container.Refresh')

But this only makes sense in rare cases, e.g. having an item which, after get chosen by the user, does not present new items but calling the refresh instead.

It depends... A plugin displays a list of items from some underlying data structure. If you can remove an item from this structure, Container.Refresh will repeat the last plugin call and the list will be presented without that item.
A plugin that I wrote for myself displays a list of favorites stored in a pickle. I have "Remove from my favorites" context menu item that removes the current item fom the pickle and then calls Container.Refresh to display a list without that item. So it is possible but only if you have control over the underlying data.
Reply
#4
(2015-06-12, 22:30)Roman_V_M Wrote: It depends... A plugin displays a list of items from some underlying data structure. If you can remove an item from this structure, Container.Refresh will repeat the last plugin call and the list will be presented without that item.
A plugin that I wrote for myself displays a list of favorites stored in a pickle. I have "Remove from my favorites" context menu item that removes the current item fom the pickle and then calls Container.Refresh to display a list without that item. So it is possible but only if you have control over the underlying data.

Yes, I use it also in multiple plugins. But I guess this wont help OP Wink
My GitHub. My Add-ons:
Image
Reply

Logout Mark Read Team Forum Stats Members Help
Refresh Directory?0