Simple Screensaver Sample - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27) +---- Forum: Look and feel (https://forum.kodi.tv/forumdisplay.php?fid=178) +---- Thread: Simple Screensaver Sample (/showthread.php?tid=180008) |
Simple Screensaver Sample - bilakos - 2013-12-09 Hi Folks, I have just developed a screensaver for Windows Desktops, which might be interesting to have also as screensaver in XBMC. The screensaver is a Dashboard displaying News with Pictures from an RSS feed, Quotes from stocks, Time, Date, weather forecasts, etc. I am looking to port this to a XBMC screensaver and am searching for a simple sample of a Screensaver "Ideally displaying only Helloworld". Anyone who can provide such a sample so I can give it a go ? Would be also interested in any other resources available. So far did not find a lot on this Topic where to start,.... RE: Simple Screensaver Sample - bilakos - 2013-12-12 Wow... How can it be that nobody has a simple sample.... RE: Simple Screensaver Sample - sphere - 2013-12-12 I created a simple sample screensaver: https://github.com/dersphere/script.screensaver.test There are also two "real" screensavers in my github account, just have a look. RE: Simple Screensaver Sample - bilakos - 2013-12-25 Thanks, sphere. This helped a lot. I modified your example and built a kind of Dashboard (showing weather conditions, RSS News and some stock quotes... Good stuff I think... will post soon a release of it... I am struggling now with threads started from within the init method of my class. There is an issue when I want to exit the xbmc screensaver (pressing any button), screen just freezes and dims and you cannot do anything.. Similar to this issue described here: http://forum.xbmc.org/showthread.php?tid=146241 How can I Close everything down if use the sleep timer... ? Here is the method causing the problem: Code: def PostRssNews(self,NewsXML): RE: Simple Screensaver Sample - sphere - 2013-12-25 You should use "xbmc.sleep()" instead "time.sleep()" (Keep in mind that xbmc.sleep() takes msecs, not secs). It is even better to loop 60 times over a sleep time of 1 sec and checking abort_requested each time. Also you should cancel your timer thread with "t.cancel()" before exiting! RE: Simple Screensaver Sample - bilakos - 2013-12-25 Hi Sphere, thanks for your swift reply. Works a bit better now. I can cancel it via the cancel button and Screen disappears. However, my onScreensaverDeactivated not firing up when I press the button. It fires only with the second time... I removed the timer method and called now drictly my method... Here is my full code: Code: import sys RE: Simple Screensaver Sample - bilakos - 2013-12-26 Hi Sphere, any other suggestion you might think of .... ? RE: Simple Screensaver Sample - bilakos - 2013-12-27 Still struggling with this one. Googled now for hours and do not get to a proper solution. Even with the xbmc.timer function. My issue currently is that if I press a key to deactivate the screensaver my Event "onScreensaverDeactivated" is not firing up... Everything works fine if i do not use in this combination the xbmc.timer method. Any way to get around this ? |