2012-02-07, 07:45
Ok so I am working on an addon that creates an xbmcgui.Window()
...at the moment I am displaying it using doModal() and then closing it when the user hits previous...but I want this window to update as things change (it's an interface into the squeezebox music system) - so I want it to pull cover art, song titles etc, as soon as possible if there is any change.
I am just wondering what the best way to loop and do updates is...I presume I could do maybe
while true:
setProperties (check if song title, cover art etc. have changed and pull if needed)
windows.show()
sleep 0.1
..or similar...and then call close on the previous menu action? I presume the window stays showing until a close is called?
Is this system friendly - even vaguely on the right track? Basically, while this is running, it will take over the GUI system and the user will have to exit the script to get out of it, that's fine (they can re-enter and it will re-query the external system to see where it's at etc).
But I don't want to do something that's super system heavy or whatever.
Basically, I have no clue and haven't been able to find a clue with extensive searching...
Any expert help much appreciated!!
...at the moment I am displaying it using doModal() and then closing it when the user hits previous...but I want this window to update as things change (it's an interface into the squeezebox music system) - so I want it to pull cover art, song titles etc, as soon as possible if there is any change.
I am just wondering what the best way to loop and do updates is...I presume I could do maybe
while true:
setProperties (check if song title, cover art etc. have changed and pull if needed)
windows.show()
sleep 0.1
..or similar...and then call close on the previous menu action? I presume the window stays showing until a close is called?
Is this system friendly - even vaguely on the right track? Basically, while this is running, it will take over the GUI system and the user will have to exit the script to get out of it, that's fine (they can re-enter and it will re-query the external system to see where it's at etc).
But I don't want to do something that's super system heavy or whatever.
Basically, I have no clue and haven't been able to find a clue with extensive searching...
Any expert help much appreciated!!