Defer/block standby while syncing

Hi All,

First of all, thank you to everybody for developing, maintaining and enhancing such a great application.

I would like to suggest the following that can speed up the workflow of some people: defer or block the computer standby while syncing.

The idea came because I sometimes add a full collection at work and leave the computer. However, when I come back the computer is in standby and the collection has only been partially synced (and this is anoying if I have to leave straight away and were counting on reading the stuff at home! :) )

Thus, I guess, the idea is to block system standby while syncing, just as some media players do (e.g. VLC does it when on full screen).

Thanks a lot again,

Aleix
  • This would be really useful. I do not know how feasible it would be to implement in a Firefox plugin, though.
  • Should be possible.

    https://addons.mozilla.org/en-us/firefox/addon/no-sleep-download/
    When a download begins, it makes a call to kernel32.dll SetThreadExecutionState to prevent the computer from going to sleep. Additional downloads simply increment an internal counter. When the counter hits zero (supposedly when all download have either completed, failed, or been paused, etc), it calls SetThreadExecutionState again to allow the computer to go to sleep again.
    Not sure how to do it in Linux or Mac though, but I imagine it should be possible
  • edited March 11, 2013
    It's also possible we could trigger a MouseEvent, though I don't know if that would prevent sleep.

    Failing that, and if Mozilla doesn't give us another way to do it, this might require using js-ctypes.
Sign In or Register to comment.