New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ToggleScrSvr function and expose it for python scripts to call upon. #1656
Conversation
imo this should be more of an app ping thing. ie it also pings the idle timer. |
@cptspiff: At the moment I plan to use this function to write a python screensaver script which starts the windows system screensaver instead of providing or using an xbmc internal one. A feature which I noticed was asked for several times over the last two years via the forum by different people. Calling the external screensaver will however make XBMC loose focus and not react to the mouse move or keypress which exits the windows saver. On return the black xbmc screensaver window will still be open and I found no xbmc function to make it close without having the user to interact. (which would reset the idle timer, too) That is my usecase. Maybe unrelevant for most people. But the toggle function itself I deem quite useful to have for scripts and addons writers (see Gifties comment). The http-api is gone and I don't know if toggling the screensaver is doable by json-rpc. |
i'm saying rename the function and make it more usable by making it do an app ping rather than just waking up the screensaver. |
@cptspiff: An app ping how I understand it, would only wake something up, right? It won't make sense to have it toggle between "waking" and "sleeping", or am I missing something? "Waking" will only work if the screensaver is running. What other processes has xbmc running that need to be woken up? No python script will be able to wake the pc from suspend if no timer is involved. Which probably would go a bit above my coding skills. :) For "sleeping" it would be possible to suspend instead of screensaver. I can't imagine other xbmc processes that need to be activated for "sleeping"?! And for suspend I would rather use a seperate function and not mix it with the screensaver one. So for me the name as it is makes perfect sense. Even if the idle timer is resetted on toggling. What name would you suggest the function should have? |
XBMC.PingApp or something like that. my point here is that, while currently there is only idle timer and ssaver, who knows what might pop up later that makes sense. being prepared... |
@cptspiff: |
makes sense. |
This adds a function to toggle the screensaver on/off. By adding it to builtin.cpp it gets exposed to python scripts or addons to call upon it when needed.