Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

Commit 53ef51b

Browse files
committed
Fix TypeError while reporting invalid angle
Fixes #12
1 parent 6653237 commit 53ef51b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

downloader.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def add_inputs(token, cmd, angle_playlists, angle):
131131
if angle > len(angle_playlists):
132132
print(
133133
f"Invalid angle {angle} selected.",
134-
f"Downloading available angles: {', '.join(angle_playlists)}.",
134+
f"Downloading available angles: {', '.join(map(str, angle_playlists))}.",
135+
"(where 0=both, 1=right, 2=left)"
135136
)
136137
angle = 0
137138

@@ -163,6 +164,11 @@ def download_stream(token, stream_url, output_file: Path, quality="720p", angle=
163164
print("Some error while getting", stream_url)
164165
return
165166
angle_playlists = get_angle_playlists(variant_pls)
167+
168+
if not angle_playlists:
169+
print("No video streams found")
170+
return
171+
166172
add_inputs(token, cmd, angle_playlists, angle)
167173

168174
cmd += ["-c", "copy", str(output_file)]

0 commit comments

Comments
 (0)