diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-06 06:35:24 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-11-06 07:53:55 +0530 |
commit | 34921b43451a23d8cd7350f8511269bdfd35cf61 (patch) | |
tree | 4cc0f567f0b159299b41de0b2b372e066936be3f /yt_dlp/extractor/lego.py | |
parent | a331949df396d69e648fad61a80ada5da3279704 (diff) | |
download | hypervideo-pre-34921b43451a23d8cd7350f8511269bdfd35cf61.tar.lz hypervideo-pre-34921b43451a23d8cd7350f8511269bdfd35cf61.tar.xz hypervideo-pre-34921b43451a23d8cd7350f8511269bdfd35cf61.zip |
[utils] Add `join_nonempty`
Diffstat (limited to 'yt_dlp/extractor/lego.py')
-rw-r--r-- | yt_dlp/extractor/lego.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/yt_dlp/extractor/lego.py b/yt_dlp/extractor/lego.py index b9d8b167c..901f43bcf 100644 --- a/yt_dlp/extractor/lego.py +++ b/yt_dlp/extractor/lego.py @@ -8,6 +8,7 @@ from ..compat import compat_HTTPError from ..utils import ( ExtractorError, int_or_none, + join_nonempty, qualities, ) @@ -102,12 +103,8 @@ class LEGOIE(InfoExtractor): m3u8_id=video_source_format, fatal=False)) else: video_source_quality = video_source.get('Quality') - format_id = [] - for v in (video_source_format, video_source_quality): - if v: - format_id.append(v) f = { - 'format_id': '-'.join(format_id), + 'format_id': join_nonempty(video_source_format, video_source_quality), 'quality': q(video_source_quality), 'url': video_source_url, } |