src/streamlink_cli/main.py
def setup_args(parser, config_files=[], ignore_unknown=False):
    """Parses arguments."""
    global args
    arglist = sys.argv[1:]

    # Load arguments from config files
    for config_file in filter(os.path.isfile, config_files):
        arglist.insert(0, "@" + config_file)

    args, unknown = parser.parse_known_args(arglist)
    if unknown and not ignore_unknown:
        msg = gettext('unrecognized arguments: %s')
        parser.error(msg % ' '.join(unknown))

    # Force lowercase to allow case-insensitive lookup
    if args.stream:
        args.stream = [stream.lower() for stream in args.stream]

    if not args.url and args.url_param:
        args.url = args.url_param
def setup_args(parser, config_files=[], ignore_unknown=False):
    global args
    arglist = sys.argv[1:]

    # Load arguments from config files
    for config_file in filter(os.path.isfile, config_files):
        arglist.insert(0, "@" + config_file)

    args, unknown = parser.parse_known_args(arglist)
    if unknown and not ignore_unknown:
        msg = gettext('unrecognized arguments: %s')
        parser.error(msg % ' '.join(unknown))

    # Force lowercase to allow case-insensitive lookup
    if args.stream:
        args.stream = [stream.lower() for stream in args.stream]

    if not args.url and args.url_param:
        args.url = args.url_param
def setup_args ( parser , config_files = [ ] , ignore_unknown = False ) : global args arglist = sys . argv [ 1 : ] # Load arguments from config files for config_file in filter ( os . path . isfile , config_files ) : arglist . insert ( 0 , "@" + config_file ) args , unknown = parser . parse_known_args ( arglist ) if unknown and not ignore_unknown : msg = gettext ( 'unrecognized arguments: %s' ) parser . error ( msg % ' ' . join ( unknown ) ) # Force lowercase to allow case-insensitive lookup if args . stream : args . stream = [ stream . lower ( ) for stream in args . stream ] if not args . url and args . url_param : args . url = args . url_param
Parses arguments.
Parses arguments .