summaryrefslogtreecommitdiffstats
path: root/yt_dlp/extractor/yandexdisk.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-05 09:06:10 +0000
commit137f07c27a88b07df57df5b2cdebebe3c7722bac (patch)
tree4ebdcbea6b540f69c40ba0be6ac766008030d149 /yt_dlp/extractor/yandexdisk.py
parentAdding debian version 2024.05.27-1. (diff)
downloadyt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.tar.xz
yt-dlp-137f07c27a88b07df57df5b2cdebebe3c7722bac.zip
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'yt_dlp/extractor/yandexdisk.py')
-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,