summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/yandexdisk.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--yt_dlp/extractor/yandexdisk.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/yt_dlp/extractor/yandexdisk.py b/yt_dlp/extractor/yandexdisk.py
index d5eecbd..3214816 100644
--- a/yt_dlp/extractor/yandexdisk.py
+++ b/yt_dlp/extractor/yandexdisk.py
@@ -5,6 +5,7 @@ from ..utils import (
determine_ext,
float_or_none,
int_or_none,
+ join_nonempty,
mimetype2ext,
try_get,
urljoin,
@@ -102,7 +103,7 @@ class YandexDiskIE(InfoExtractor):
'format_id': 'source',
'ext': determine_ext(title, meta.get('ext') or mimetype2ext(meta.get('mime_type')) or 'mp4'),
'quality': 1,
- 'filesize': int_or_none(meta.get('size'))
+ 'filesize': int_or_none(meta.get('size')),
})
for video in (video_streams.get('videos') or []):
@@ -116,12 +117,9 @@ class YandexDiskIE(InfoExtractor):
else:
size = video.get('size') or {}
height = int_or_none(size.get('height'))
- format_id = 'hls'
- if height:
- format_id += '-%dp' % height
formats.append({
'ext': 'mp4',
- 'format_id': format_id,
+ 'format_id': join_nonempty('hls', height and f'{height}p'),
'height': height,
'protocol': 'm3u8_native',
'url': format_url,