{"action":"opened","issue":{"url":"https://api.github.com/repos/streamlink/streamlink/issues/276","repository_url":"https://api.github.com/repos/streamlink/streamlink","labels_url":"https://api.github.com/repos/streamlink/streamlink/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/streamlink/streamlink/issues/276/comments","events_url":"https://api.github.com/repos/streamlink/streamlink/issues/276/events","html_url":"https://github.com/streamlink/streamlink/issues/276","id":194439035,"number":276,"title":"Less violent way of closing player when stream ends","user":{"login":"LoneFox78","id":12947795,"avatar_url":"https://avatars.githubusercontent.com/u/12947795?v=3","gravatar_id":"","url":"https://api.github.com/users/LoneFox78","html_url":"https://github.com/LoneFox78","followers_url":"https://api.github.com/users/LoneFox78/followers","following_url":"https://api.github.com/users/LoneFox78/following{/other_user}","gists_url":"https://api.github.com/users/LoneFox78/gists{/gist_id}","starred_url":"https://api.github.com/users/LoneFox78/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoneFox78/subscriptions","organizations_url":"https://api.github.com/users/LoneFox78/orgs","repos_url":"https://api.github.com/users/LoneFox78/repos","events_url":"https://api.github.com/users/LoneFox78/events{/privacy}","received_events_url":"https://api.github.com/users/LoneFox78/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-08T20:41:24Z","updated_at":"2016-12-08T20:41:24Z","closed_at":null,"body":"Currently streamlink uses SIGKILL to close the player when a stream ends. This prevents the player from doing its own cleanup. For example, mpv leaves DPMS/screensaver disabled because of this. I know there is --player-no-close option, but that has an unwanted side-effect of not closing the player immediately in some situations.\r\n\r\nI suggest fixing it by using SIGTERM instead:\r\n```\r\ndiff -bur streamlink-0.1.0-orig/src/streamlink_cli/output.py streamlink-0.1.0/src/streamlink_cli/output.py\r\n--- streamlink-0.1.0-orig/src/streamlink_cli/output.py  2016-11-21 21:56:29.000000000 +0200\r\n+++ streamlink-0.1.0/src/streamlink_cli/output.py       2016-12-08 22:08:23.000000000 +0200\r\n@@ -161,7 +161,7 @@\r\n \r\n         if self.kill:\r\n             with ignored(Exception):\r\n-                self.player.kill()\r\n+                self.player.terminate()\r\n         self.player.wait()\r\n \r\n     def _write(self, data):\r\n```"}}
{"actor":{"display_login":"LoneFox78"}}