aboutsummaryrefslogtreecommitdiff
path: root/yt_dlp/extractor/yandexdisk.py
diff options
context:
space:
mode:
authorbashonly <88596187+bashonly@users.noreply.github.com>2024-07-01 17:51:27 -0500
committerGitHub <noreply@github.com>2024-07-01 22:51:27 +0000
commit6aaf96a3d6e7d0d426e97e11a2fcf52fda00e733 (patch)
tree69672ff4be314bd55650fac1e9a97280cecd61e0 /yt_dlp/extractor/yandexdisk.py
parentd4b99a233314bf31f9c842035ea9884673d5313a (diff)
[cleanup] Misc (#10075)
Closes #10303 Authored by: bashonly, seproDev, jucor, c-basalt Co-authored-by: sepro <4618135+seproDev@users.noreply.github.com> Co-authored-by: Julien Cornebise <julien@cornebise.com> Co-authored-by: c-basalt <117849907+c-basalt@users.noreply.github.com>
Diffstat (limited to 'yt_dlp/extractor/yandexdisk.py')
-rw-r--r--yt_dlp/extractor/yandexdisk.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/yt_dlp/extractor/yandexdisk.py b/yt_dlp/extractor/yandexdisk.py
index 56aa79292..321481670 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,
@@ -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 += f'-{height}p'
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,