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:
parent
309ff40943
commit
ef867e3759
@ -578,7 +578,7 @@ def get_watch_page(video_id=None):
|
|||||||
'quality')
|
'quality')
|
||||||
uni_quality = yt_data_extract.deep_get(uni_sources, uni_idx, 'quality')
|
uni_quality = yt_data_extract.deep_get(uni_sources, uni_idx, 'quality')
|
||||||
using_pair_sources = (
|
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
|
# 1 second per pixel, or the actual video width
|
||||||
|
Loading…
x
Reference in New Issue
Block a user