diff options
author | James Taylor <user234683@users.noreply.github.com> | 2021-08-27 22:16:36 -0700 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-08-29 22:47:22 -0500 |
commit | ef867e3759ef417c51adb156c3636b9ada51e48c (patch) | |
tree | 450751914a085d4f803d7c8cd9c2cad3acd7d4b5 | |
parent | 309ff409436a5a016c33f71f8b483d9ed226aaaf (diff) | |
download | yt-local-ef867e3759ef417c51adb156c3636b9ada51e48c.tar.lz yt-local-ef867e3759ef417c51adb156c3636b9ada51e48c.tar.xz yt-local-ef867e3759ef417c51adb156c3636b9ada51e48c.zip |
watch: Fix using_pair_sources being a list due to short-circuiting
In the case where pair_sources is empty due to a playability
error, using_pair_sources will be assigned to pair_sources
(empty list) because of short circuiting. Make it a bool
Signed-off-by: Jesús <heckyel@hyperbola.info>
-rw-r--r-- | youtube/watch.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube/watch.py b/youtube/watch.py index 5bb3341..32b6eef 100644 --- a/youtube/watch.py +++ b/youtube/watch.py @@ -578,7 +578,7 @@ def get_watch_page(video_id=None): 'quality') uni_quality = yt_data_extract.deep_get(uni_sources, uni_idx, 'quality') using_pair_sources = ( - pair_sources and (not uni_sources or pair_quality != uni_quality) + bool(pair_sources) and (not uni_sources or pair_quality != uni_quality) ) # 1 second per pixel, or the actual video width |