streamlink-twitch-gui icon indicating copy to clipboard operation
streamlink-twitch-gui copied to clipboard

Sleep feature?

Open bonekid opened this issue 7 years ago • 1 comments

Would it be possible to add a sleep function to automatically close the stream after a certain time? I like to watch streams before going to bed and it would be nice if the player would close after a certain time so my computer would go into sleep mode.

bonekid avatar Apr 09 '18 20:04 bonekid

A sleep timer doesn't sound like a bad idea. It would be on the bottom of my priority list, though. Then there are also a couple of issues which need to be considered first. Since the GUI doesn't have control over the spawned player process, as this is being done by Streamlink itself, closing the player is impossible from the GUI while the "passthrough" stream type is being selected by the user. By choosing the "passthrough" method, Streamlink doesn't close the player when its own process gets terminated, which is a feature of its CLI. In addition to that, there's also the --player-no-close option, which tells Streamlink to not terminate the player process on exit. Both those features are in conflict with a sleep timer function and it would need to be disabled if those conflicting options are selected/enabled.

For now, you can use the player's sleep timer - if it has such a feature implemented. This won't close the Twitch GUI, though. Another option could be writing a little shell script, which simply kills the entire process tree.

bastimeyer avatar Apr 13 '18 16:04 bastimeyer