Posts: 1,466
Joined: Jul 2005
Reputation:
29
Basje
Team-Kodi Member
Posts: 1,466
Is there any possibility to show the XBMC Busy Dialog from a script?
It would be nice to freeze the UI for a moment while some background tasks are performed?
Posts: 2,710
Joined: Feb 2009
Reputation:
12
ppic
Skilled Python Coder
Posts: 2,710
you have the builtin :
lock(...)
lock() -- Lock the gui until xbmcgui.unlock() is called.
*Note, This will improve performance when doing a lot of gui manipulation at once.
The main program (xbmc itself) will freeze until xbmcgui.unlock() is called.
example:
- xbmcgui.lock()
Posts: 1,466
Joined: Jul 2005
Reputation:
29
Basje
Team-Kodi Member
Posts: 1,466
Well, I am almost there. I still have this issue:
I add context menu items to my Video Add-on items with these commands:
XBMC.RunPlugin() or XBMC.RunScript() and call the Video Add-on to do some stuff (download/mark).
When I select those items they start correctly but at the same time XBMC refreshes the listing of the Video Add-on and thus the Add-on is running twice at the same time, giving me all kind of locking issues (in logfile, databases).
Is there a way to force XBMC to wait for the XBMC.RunPlugin() to finish before doing anything else?