]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/extractor/adobetv.py
[utils] Add `join_nonempty`
[yt-dlp.git] / yt_dlp / extractor / adobetv.py
index 12b8192060731ef270eb7200dd4012cc4eae0331..3cfa1ff550a2fb16b00639c9b5f7331906ffaff3 100644 (file)
@@ -9,6 +9,7 @@
     float_or_none,
     int_or_none,
     ISO639Utils,
+    join_nonempty,
     OnDemandPagedList,
     parse_duration,
     str_or_none,
@@ -263,7 +264,7 @@ def _real_extract(self, url):
                 continue
             formats.append({
                 'filesize': int_or_none(source.get('kilobytes') or None, invscale=1000),
-                'format_id': '-'.join(filter(None, [source.get('format'), source.get('label')])),
+                'format_id': join_nonempty(source.get('format'), source.get('label')),
                 'height': int_or_none(source.get('height') or None),
                 'tbr': int_or_none(source.get('bitrate') or None),
                 'width': int_or_none(source.get('width') or None),