diff options
author | Christopher Rosell <chrippa@tanuki.se> | 2012-08-25 04:03:37 -0700 |
---|---|---|
committer | Christopher Rosell <chrippa@tanuki.se> | 2012-08-25 04:03:37 -0700 |
commit | 91363e5628dd30e34ab254c619246a298333f8bc (patch) | |
tree | 2f2d8f74a194a4c5012a3254b58404c79f7e18a5 /src/livestreamer/cli.py | |
parent | 8545ee9aec203c0fcbeb64810022a3018e1590d4 (diff) | |
parent | 550257a2a0b3c2fa4e427cb5a0a6c75e4b727179 (diff) |
Merge pull request #21 from niallm90/plugin-gomtv
GOMTV.net plugin
Diffstat (limited to 'src/livestreamer/cli.py')
-rw-r--r-- | src/livestreamer/cli.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/livestreamer/cli.py b/src/livestreamer/cli.py index e04f545..396b8b2 100644 --- a/src/livestreamer/cli.py +++ b/src/livestreamer/cli.py @@ -2,6 +2,7 @@ import argparse import os import sys import subprocess +import getpass from livestreamer import * from livestreamer.compat import input, stdout, is_win32 @@ -64,6 +65,13 @@ pluginopt.add_argument("-r", "--rtmpdump", metavar="path", help="Specify location of rtmpdump") pluginopt.add_argument("-j", "--jtv-cookie", metavar="cookie", help="Specify JustinTV cookie to allow access to subscription channels") +pluginopt.add_argument("--gomtv-cookie", metavar="cookie", + help="Specify GOMTV cookie to allow access to streams") +pluginopt.add_argument("--gomtv-username", metavar="username", + help="Specify GOMTV username to allow access to streams") +pluginopt.add_argument("--gomtv-password", metavar="password", + help="Specify GOMTV password to allow access to streams (If left blank you will be prompted)", + nargs="?", const=True, default=None) if is_win32: RCFILE = os.path.join(os.environ["APPDATA"], "livestreamer", "livestreamerrc") @@ -257,9 +265,17 @@ def main(): if args.stdout or args.output == "-": set_msg_output(sys.stderr) + if args.gomtv_password is True: + gomtv_password = getpass.getpass("GOMTV Password:") + else: + gomtv_password = args.gomtv_password + livestreamer.set_option("errorlog", args.errorlog) livestreamer.set_option("rtmpdump", args.rtmpdump) livestreamer.set_plugin_option("justintv", "cookie", args.jtv_cookie) + livestreamer.set_plugin_option("gomtv", "cookie", args.gomtv_cookie) + livestreamer.set_plugin_option("gomtv", "username", args.gomtv_username) + livestreamer.set_plugin_option("gomtv", "password", gomtv_password) livestreamer.set_loglevel(args.loglevel) if args.url: |