mirror of
https://github.com/ihabunek/twitch-dl
synced 2024-08-30 18:32:25 +00:00
Fix info command
This commit is contained in:
parent
45821ceb0e
commit
d848826ec3
@ -6,7 +6,7 @@ from twitchdl.output import print_video, print_clip, print_json, print_out, prin
|
|||||||
|
|
||||||
|
|
||||||
def info(args):
|
def info(args):
|
||||||
video_id = utils.parse_video_identifier(args.identifier)
|
video_id = utils.parse_video_identifier(args.video)
|
||||||
if video_id:
|
if video_id:
|
||||||
print_log("Fetching video...")
|
print_log("Fetching video...")
|
||||||
video = twitch.get_video(video_id)
|
video = twitch.get_video(video_id)
|
||||||
@ -27,7 +27,7 @@ def info(args):
|
|||||||
video_info(video, playlists)
|
video_info(video, playlists)
|
||||||
return
|
return
|
||||||
|
|
||||||
clip_slug = utils.parse_clip_identifier(args.identifier)
|
clip_slug = utils.parse_clip_identifier(args.video)
|
||||||
if clip_slug:
|
if clip_slug:
|
||||||
print_log("Fetching clip...")
|
print_log("Fetching clip...")
|
||||||
clip = twitch.get_clip(clip_slug)
|
clip = twitch.get_clip(clip_slug)
|
||||||
@ -40,7 +40,7 @@ def info(args):
|
|||||||
clip_info(clip)
|
clip_info(clip)
|
||||||
return
|
return
|
||||||
|
|
||||||
raise ConsoleError("Invalid input: {}".format(args.identifier))
|
raise ConsoleError("Invalid input: {}".format(args.video))
|
||||||
|
|
||||||
|
|
||||||
def video_info(video, playlists):
|
def video_info(video, playlists):
|
||||||
|
Loading…
Reference in New Issue
Block a user