diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-08-15 21:05:35 +0200 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-08-15 21:05:35 +0200 |
commit | fc4e35ed68fc399e1de0b27282a53f6b1bfbf962 (patch) | |
tree | ecdd6c67ae7cf5497a16e4428dbdcc6bf6f54874 | |
parent | e8eedda5453aca95996c3d99380b1070c23f1dd9 (diff) |
Kill player when stream is over.
-rw-r--r-- | src/livestreamer/cli.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index ee38685..7845823 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -108,6 +108,7 @@ def check_output(output, force): def output_stream(stream, args): progress = False out = None + player = None logger.info("Opening stream {0}", args.stream) @@ -162,6 +163,9 @@ def output_stream(stream, args): except KeyboardInterrupt: sys.exit() + if player: + player.kill() + def handle_url(args): try: channel = livestreamer.resolve_url(args.url) |