mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 00:25:08 +00:00
[utils] Add join_nonempty
This commit is contained in:
@ -7,8 +7,8 @@ from .common import InfoExtractor
|
||||
from ..utils import (
|
||||
int_or_none,
|
||||
unified_strdate,
|
||||
compat_str,
|
||||
determine_ext,
|
||||
join_nonempty,
|
||||
update_url_query,
|
||||
)
|
||||
|
||||
@ -119,18 +119,13 @@ class DisneyIE(InfoExtractor):
|
||||
continue
|
||||
formats.append(f)
|
||||
continue
|
||||
format_id = []
|
||||
if flavor_format:
|
||||
format_id.append(flavor_format)
|
||||
if tbr:
|
||||
format_id.append(compat_str(tbr))
|
||||
ext = determine_ext(flavor_url)
|
||||
if flavor_format == 'applehttp' or ext == 'm3u8':
|
||||
ext = 'mp4'
|
||||
width = int_or_none(flavor.get('width'))
|
||||
height = int_or_none(flavor.get('height'))
|
||||
formats.append({
|
||||
'format_id': '-'.join(format_id),
|
||||
'format_id': join_nonempty(flavor_format, tbr),
|
||||
'url': flavor_url,
|
||||
'width': width,
|
||||
'height': height,
|
||||
|
Reference in New Issue
Block a user