diff --git a/twitchdl/output.py b/twitchdl/output.py index 6179768..6f0b983 100644 --- a/twitchdl/output.py +++ b/twitchdl/output.py @@ -61,13 +61,16 @@ def print_video(video): published_at = video["publishedAt"].replace("T", " @ ").replace("Z", "") length = utils.format_duration(video["lengthSeconds"]) channel = video["creator"]["channel"]["displayName"] - game = video["game"]["name"] + playing = ( + " playing {}".format(video["game"]["name"]) + if video["game"] else "" + ) # Can't find URL in video object, strange url = "https://twitch.tv/{}".format(video["id"]) print_out("\n{}".format(video["id"])) print_out("{}".format(video["title"])) - print_out("{} playing {}".format(channel, game)) + print_out("{} {}".format(channel, playing)) print_out("Published {} Length: {} ".format(published_at, length)) print_out("{}".format(url))