mirror of https://github.com/streamlink/streamlink
cli: Add --can-handle-url option, useful for scripting.
This commit is contained in:
parent
3cd7f604b9
commit
fe0d72f825
|
@ -1,8 +1,20 @@
|
|||
Version 1.12.0 (Under development)
|
||||
----------------------------------
|
||||
|
||||
CLI:
|
||||
- Added :option:`--can-handle-url` option, useful for scripting.
|
||||
|
||||
|
||||
Plugins:
|
||||
- hitbox: Updated for services changes. (#648)
|
||||
- youtube: Now handles more URL types.
|
||||
|
||||
|
||||
Version 1.11.1 (2014-12-12)
|
||||
---------------------------
|
||||
|
||||
Plugins:
|
||||
- twitch: Updated for API changes. (#633)
|
||||
- twitch: Updated for API changes. (#633)
|
||||
|
||||
|
||||
Version 1.11.0 (2014-12-10)
|
||||
|
|
|
@ -201,6 +201,17 @@ general.add_argument(
|
|||
Print a list of all currently installed plugins.
|
||||
"""
|
||||
)
|
||||
general.add_argument(
|
||||
"--can-handle-url",
|
||||
metavar="URL",
|
||||
help="""
|
||||
Check if Livestreamer has a plugin that can handle the specified URL.
|
||||
|
||||
Returns status code 1 for false and 0 for true.
|
||||
|
||||
Useful for external scripting.
|
||||
"""
|
||||
)
|
||||
general.add_argument(
|
||||
"--config",
|
||||
action="append",
|
||||
|
|
|
@ -844,6 +844,13 @@ def main():
|
|||
|
||||
if args.plugins:
|
||||
print_plugins()
|
||||
elif args.can_handle_url:
|
||||
try:
|
||||
livestreamer.resolve_url(args.can_handle_url)
|
||||
except NoPluginError:
|
||||
sys.exit(1)
|
||||
else:
|
||||
sys.exit(0)
|
||||
elif args.url:
|
||||
try:
|
||||
setup_options()
|
||||
|
|
Loading…
Reference in New Issue