Release - PyXBMCt: a Python framework for simple creating UI for XBMC addons

  Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
el_Paraguayo Offline
Donor
Posts: 847
Joined: Feb 2011
Reputation: 19
Location: London, UK
Post: #181
Seems to be the second method on this page: http://romanvm.github.io/xbmcstubs/docs/...class.html

(PyXBMCt is essentially a wrapper for the xbmcgui control hence the references in the PyXBMCt docs to "inheriting" properties/methods from the class I referred to above.)

MythSuspendAlarm: Suspend and wake for next MythTV recording.
BBC Live Football Scores: Football scores notifications.
Random Movie Script: Play random movies from library.
(This post was last modified: 2015-08-07 10:43 by el_Paraguayo.)
find quote
Eldorado Offline
Fan
Posts: 564
Joined: May 2009
Reputation: 18
Post: #182
Is there any way to have a AddonDialogWindow auto close after a set period of time?

I would like to display a notification box but would like the addon to continue what it's doing behind it, so doing something like using .show() then setting a delay and then closing the window won't quite work as it will hold up the addon

An option is to open it in it's own thread but requires some extra code that could be a bit of a pain to implement

So was hoping there could be an option (possible feature request?) where you could connect to the window a 'timer' type object

eg.
Code:
timer = pyxbmct.Timer(3000)
window.connect(timer, window.close)
find quote
Roman_V_M Offline
Fan
Posts: 698
Joined: Jun 2011
Reputation: 21
Location: Kyiv, Ukraine
Post: #183
(2015-09-02 22:12)Eldorado Wrote:  Is there any way to have a AddonDialogWindow auto close after a set period of time?

I would like to display a notification box but would like the addon to continue what it's doing behind it, so doing something like using .show() then setting a delay and then closing the window won't quite work as it will hold up the addon

An option is to open it in it's own thread but requires some extra code that could be a bit of a pain to implement

So was hoping there could be an option (possible feature request?) where you could connect to the window a 'timer' type object

eg.
Code:
timer = pyxbmct.Timer(3000)
window.connect(timer, window.close)

As it's said just one message above yours PyXBMCt is essentially a wrapper for several xbmcgui classes. So the answer is no: it can do only as much as Kodi API allows and WindowDialog class (a parent class of AddonDialogWindow) does not have such feature.
As for connection, again, essentially you can connect only events generated by Kodi itself (key presses and on-screen Controls activation), not custom events.

So I guess, to close your window after a specified amount of time without blocking UI you need to run some wait timer in a separate thread and then execute .close() when the timeout expires.

AMD A4-3300 + AsRock A75M-ITX
Kodi 14.x on Windows 7
find quote
Post Reply