Shutdown, Hibernate or Suspend computer after current video has been played #237

wants to merge 2 commits into


None yet
3 participants

CrHasher commented Jun 30, 2011


There is a new button in the video player GUI (bottom right corner) that is enabled if at list one power mode is supported (Suspend, Hibernate, Shutdown). Pressing the button brings up a window where you can select power state after playback, computer will go in that mode after current video ended. If end of video is not reached changing power state is aborted.

P.S. Feel free to change the button graphics :D


jmarshallnz commented Jun 30, 2011

Don't we have a setting that goes to sleep/powers down if idle for K minutes? If so, that pretty much does the same thing.

In addition we also have a sleep functionality which also does something similar.

Adding yet another option seems the wrong way to go here.


CrHasher commented Jul 1, 2011

@jmarshallnz: Power saving feature does not work in every case. Sometimes I use the laptop to play a TV show, I set the power options, but because of the optical mouse attached to the laptop, cursor moves on itself or jumps and XBMC never idles, happens even on my desktop computer.

@pieh: Agree that adding a new button to the GUI is overkill, but currently if you set power saving function it will be saved next time you start XBMC as your preferred settings. So if I set Shutdown when idle for 5mins (as default) then if I ALT-TAB to another program or go to the bathroom, XBMC will shut-down the computer after 5mins if a video is not playing, right? I don’t want that setting turned on always and it’s too deep in System settings to always change it.


topfs2 commented Jul 1, 2011

I agree with jmarshall, seems like it does what the idle method should catch (while it may take a slight bit longer time before it happens).

Regarding your problem with mouse, perhaps it would be better to have idle detection be a slightly bit less sensitive. i.e. add so that you need to move your mouse a larger amount / or invoke an action to actually be considered active?


CrHasher commented Jul 5, 2011

Power saving function works as intended no need to change it. I close this pull request and will open a new one with a better solution.

CrHasher closed this Jul 5, 2011

@tru tru added a commit to plexinc/plex-home-theater-public that referenced this pull request Jan 11, 2013

@tru tru Use lexical_cast when handling viewOffset
Dear XBMC developers, when you have a Variant class that you can call
.asInteger() on, please don't silently fail when the stored value is a

Fixes: #237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment