diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-05-03 15:11:59 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-05-03 22:49:04 +0530 |
commit | 0d1bb027aab2aa96be12caac8ed9bcd5e0d3a2f5 (patch) | |
tree | b1437b98e35a58e02296c5842614a05739c46343 /yt_dlp/YoutubeDL.py | |
parent | 4cd0a709aa4cd388cae0795070bfdf26e97ec18c (diff) | |
download | hypervideo-pre-0d1bb027aab2aa96be12caac8ed9bcd5e0d3a2f5.tar.lz hypervideo-pre-0d1bb027aab2aa96be12caac8ed9bcd5e0d3a2f5.tar.xz hypervideo-pre-0d1bb027aab2aa96be12caac8ed9bcd5e0d3a2f5.zip |
Move option warnings to `YoutubeDL`
Previously, these warnings did not obey `--no-warnings` and did not output colors
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 56ebc5067..98f320b2e 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -474,6 +474,13 @@ class YoutubeDL(object): if self.params.get('geo_verification_proxy') is None: self.params['geo_verification_proxy'] = self.params['cn_verification_proxy'] + check_deprecated('autonumber_size', '--autonumber-size', 'output template with %(autonumber)0Nd, where N in the number of digits') + check_deprecated('autonumber', '--auto-number', '-o "%(autonumber)s-%(title)s.%(ext)s"') + check_deprecated('usetitle', '--title', '-o "%(title)s-%(id)s.%(ext)s"') + + for msg in self.params.get('warnings', []): + self.report_warning(msg) + if self.params.get('final_ext'): if self.params.get('merge_output_format'): self.report_warning('--merge-output-format will be ignored since --remux-video or --recode-video is given') @@ -482,10 +489,6 @@ class YoutubeDL(object): if 'overwrites' in self.params and self.params['overwrites'] is None: del self.params['overwrites'] - check_deprecated('autonumber_size', '--autonumber-size', 'output template with %(autonumber)0Nd, where N in the number of digits') - check_deprecated('autonumber', '--auto-number', '-o "%(autonumber)s-%(title)s.%(ext)s"') - check_deprecated('usetitle', '--title', '-o "%(title)s-%(id)s.%(ext)s"') - if params.get('bidi_workaround', False): try: import pty |