diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-03-21 16:24:45 +0100 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-03-21 16:24:45 +0100 |
commit | 0f3765749001279fe232914bfa852650c4fd1162 (patch) | |
tree | 4236330f90d37783ddb76418a106b70d3912d6c1 /src/livestreamer/cli.py | |
parent | f175241692dfc461d773589653fd55c47508a293 (diff) |
Refactor the stream/command line handling.
Diffstat (limited to 'src/livestreamer/cli.py')
-rw-r--r-- | src/livestreamer/cli.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index 1965e7e..58c935c 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -36,19 +36,19 @@ def handle_url(args): if args.stream: if args.stream in streams: stream = streams[args.stream] - cmdline = plugin.stream_cmdline(stream, args.output or "-") + cmdline = stream.cmdline(args.output or "-") if args.cmdline: - print(cmdline) + print(cmdline.format()) sys.exit() else: if not args.output: - cmdline = ("{0} | {1} -").format(cmdline, args.player) - os.system(cmdline) + cmdline.pipe = ("{0} -").format(args.player) + + os.system(cmdline.format()) else: print(("This channel does not have stream: {0}").format(args.stream)) print(("Valid streams: {0}").format(validstreams)) - sys.exit() else: print(("Found streams: {0}").format(validstreams)) |