diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-03-04 19:40:10 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-03-04 19:49:36 +0530 |
commit | 4c3f8c3fb68637d80acc58f908b1511f9160bdbc (patch) | |
tree | cb1dab657a777d3c110d8b25c3f5e097ca021572 /yt_dlp/YoutubeDL.py | |
parent | 7265a2190c46b7312669d613898055c2b080d26e (diff) | |
download | hypervideo-pre-4c3f8c3fb68637d80acc58f908b1511f9160bdbc.tar.lz hypervideo-pre-4c3f8c3fb68637d80acc58f908b1511f9160bdbc.tar.xz hypervideo-pre-4c3f8c3fb68637d80acc58f908b1511f9160bdbc.zip |
Handle negative duration from extractor
Closes #2921
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 10eebecf2..9672d0cd3 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -2392,6 +2392,8 @@ class YoutubeDL(object): sanitize_string_field(info_dict, 'id') sanitize_numeric_fields(info_dict) + if (info_dict.get('duration') or 0) <= 0 and info_dict.pop('duration', None): + self.report_warning('"duration" field is negative, there is an error in extractor') if 'playlist' not in info_dict: # It isn't part of a playlist |