Kethsar / ytarchive

Garbage Youtube livestream downloader
MIT License
1.04k stars 86 forks source link

(Windows specific) power management can interrupt threads in progress #103

Closed thatstarcreator closed 1 year ago

thatstarcreator commented 1 year ago

If Windows power management is configured to put the system to sleep after a period of user inactivity, this can interrupt a ytarchive instance in progress. A SetThreadExecutionState call is able to prevent this, see an example here: https://stackoverflow.com/questions/45436158/how-to-to-stop-a-machine-from-sleeping-hibernating-for-execution-period