Loading/Please wait override
#1
Hi,

I am working on an addon where I have to fetch data from remote source. Once finished fetching, I build an item directory with it and present it to the user (using built-in xbmc classes/methods). The problem is that this take sometime, and while waiting for the data to fill it in the directory, xbmc first show the "Please wait", then after two seconds or so show the "Loading directory" with incorrect progress. I assume this to fill the void of waiting. After finishing fetching the data, and proceeding to filling the directory, xbmc show the Loading directory again, but this time with the correct progress (because I have the items now).

I am trying to disable the "Please wait" and the first inccorrect "Loading directory", and replacing them with my own progress bar. I know how to do the progress bar thing, but those two messages keep my progress bar in the back. Is there a way to override them and use my progress bar instead?

I know it is a lengthy thread, but I had to explain the issue and to make myself clear (or I hope I was Smile)

Any help will be greatly appreciated.
Reply
#2
You can try closing the dialogs by using

xbmcgui.DialogProgress.close()
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#3
Hmmm, but will this close any progress bar not yet open (i.e. disable the default behavior)? or will it just close any currently open progress bars?

The problem is that I don't know when theses progress bar pop up (or why the pop up). I could continuously call this method, but it will also close my own progress bar.

I guess what you suggested is great as a way to disable it until I get the list. Thank you. I'll try to test it once I get to my xbmc box where my plugin is currently.
Reply
#4
it only closes currently open one at that specific moment
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
Well, what you suggested generated an error (requiring an argument...etc). But I found another way which is
xbmc.executebuiltin( "Dialog.Close(all,true)" )
This will force close any open dialog. The problem though, it is just like the one you suggested: it only close the currently open ones.

There is no way of closing or disabling the auto busywait dialogs in a given window or addon (and making it instead manual)... oh well.

Thanks
Reply
#6
Wouldn't the proper solution be to speedup the add-on?
Reply
#7
No, not if it is a server side delay (even with caching on the client side). The solution would be to use my own progress bar, that will be updated with useful progress, and disable the unhelpful auto one that doesn't reflect any progress whatsoever. This can't be done as it seems, but that doesn't mean I should speed it up more than it is possible.
Reply

Logout Mark Read Team Forum Stats Members Help
Loading/Please wait override0