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>
This commit is contained in:
James Taylor 2021-08-27 22:16:36 -07:00 committed by Jesús
parent 309ff40943
commit ef867e3759
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766

View File

@ -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