1
0
Fork 0

[cleanup, docs] Misc cleanup

Closes #2828, closes #2734, closes #2802, closes #2937
This commit is contained in:
pukkandan 2022-03-04 19:38:55 +05:30
commit 08d30158ec
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
20 changed files with 114 additions and 87 deletions

View file

@ -3094,6 +3094,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
# Some formats may have much smaller duration than others (possibly damaged during encoding)
# Eg: 2-nOtRESiUc Ref: https://github.com/yt-dlp/yt-dlp/issues/2823
is_damaged = try_get(fmt, lambda x: float(x['approxDurationMs']) < approx_duration - 10000)
if is_damaged:
self.report_warning(f'{video_id}: Some formats are possibly damaged. They will be deprioritized', only_once=True)
dct = {
'asr': int_or_none(fmt.get('audioSampleRate')),
'filesize': int_or_none(fmt.get('contentLength')),