Refreshing a directory
aaronb
Senior Member Posts: 151 Joined: Apr 2007 Reputation: 0 Location: Colorado |
2011-01-29 04:50
Post: #1
I added a context menu item to my SageTv plugin to delete a show. That part was pretty straightforward, but after you delete it it still shows up in the list unless you back out of the directory and go back in. Is there a way to force the directory to refresh when the user selects "Delete" from the menu? I was thinking maybe I could have two commands that get called when you hit delete, one to do the deleting and one to force the refresh. Is this possible?
|
| find quote |
cloudjacker
Junior Member Posts: 28 Joined: Jan 2011 Reputation: 0 Location: Strato Nimbus 2.0 |
2011-01-29 05:22
Post: #2
hey I just read something about replaceWindow
ReplaceWindow(window,dir) http://wiki.xbmc.org/index.php?title=Lis..._Functions maybe? |
| find quote |
daledude
Member Joined: Oct 2009 Reputation: 0 |
2011-01-29 20:26
Post: #3
http://wiki.xbmc.org/?title=List_of_Built_In_Functions
Look at Container.Refresh or Container.Update |
| find quote |
aaronb
Senior Member Posts: 151 Joined: Apr 2007 Reputation: 0 Location: Colorado |
2011-01-30 03:46
Post: #4
Thanks guys, I think those are the functions I need. But the harder part is figuring out how to call that function, since the action taken when the user hits delete is to delete the file. Can you have two actions run from the context menu?
|
| find quote |
daledude
Member Joined: Oct 2009 Reputation: 0 |
2011-01-30 18:19
Post: #5
aaronb Wrote:Thanks guys, I think those are the functions I need. But the harder part is figuring out how to call that function, since the action taken when the user hits delete is to delete the file. Can you have two actions run from the context menu? Just have the function you call with the context menu do whatever it is you want it to. i.e. after your done deleting the file then call one of the Container functions like xbmc.executebuiltin("Container.Refresh"). There are other posts in the forum that explain this better. |
| find quote |

Search
Help