mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-07-17 18:58:35 +00:00
Only add filesize
if found, rather than using int_or_none
Co-authored-by: bashonly <88596187+bashonly@users.noreply.github.com>
This commit is contained in:
parent
26d59b5c1d
commit
2fad19eea0
@ -125,8 +125,9 @@ def _real_extract(self, url):
|
||||
'aspect_ratio': ('aspectRatio', {float_or_none}),
|
||||
}))
|
||||
|
||||
for cur_format in formats:
|
||||
cur_format['filesize'] = int_or_none(video_extra.get('storageSize'))
|
||||
if filesize := traverse_obj(video_extract, ('storageSize', {int_or_none})):
|
||||
for fmt in formats:
|
||||
fmt['filesize'] = filesize
|
||||
|
||||
subtitles = {}
|
||||
for current_subs in video_info.get('subtitles'):
|
||||
|
Loading…
Reference in New Issue
Block a user