Loading/Please wait override

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tria Offline
Senior Member
Posts: 108
Joined: Jan 2012
Reputation: 0
Post: #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.
find quote
Martijn Offline
Team Kodi
Posts: 12,175
Joined: Jul 2011
Reputation: 170
Location: Dawn of time
Post: #2
You can try closing the dialogs by using

xbmcgui.DialogProgress.close()

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
tria Offline
Senior Member
Posts: 108
Joined: Jan 2012
Reputation: 0
Post: #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.
find quote
Martijn Offline
Team Kodi
Posts: 12,175
Joined: Jul 2011
Reputation: 170
Location: Dawn of time
Post: #4
it only closes currently open one at that specific moment

Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

For your mediacenter artwork go to
[Image: fanarttv.png]
find quote
tria Offline
Senior Member
Posts: 108
Joined: Jan 2012
Reputation: 0
Post: #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
find quote
TobiasTheCommie Offline
Skilled Python Coder
Posts: 618
Joined: Apr 2008
Reputation: 6
Post: #6
Wouldn't the proper solution be to speedup the add-on?
find quote
tria Offline
Senior Member
Posts: 108
Joined: Jan 2012
Reputation: 0
Post: #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.
find quote