From da1d734fbe267711aeeb9a10493b5b58d9179a0f Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 11 Mar 2022 14:29:11 +0530 Subject: [PATCH] Remove incorrect warning for `--dateafter` Closes #3030 --- yt_dlp/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 2408d4129..9138ec464 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -358,7 +358,6 @@ def metadataparser_actions(f): raise ValueError('unsupported geo-bypass country or ip-block') opts.match_filter = match_filter_func(opts.match_filter) - opts.date = DateRange.day(opts.date) if opts.date else DateRange(opts.dateafter, opts.datebefore) if opts.download_archive is not None: opts.download_archive = expand_path(opts.download_archive) @@ -406,8 +405,8 @@ def report_conflict(arg1, opt1, arg2='--allow-unplayable-formats', opt2='allow_u setattr(opts, opt1, default) # Conflicting options - report_conflict('--date-after', 'dateafter', '--date', 'date', default=None) - report_conflict('--date-before', 'datebefore', '--date', 'date', default=None) + report_conflict('--dateafter', 'dateafter', '--date', 'date', default=None) + report_conflict('--datebefore', 'datebefore', '--date', 'date', default=None) report_conflict('--exec-before-download', 'exec_before_dl_cmd', '"--exec before_dl:"', 'exec_cmd', opts.exec_cmd.get('before_dl')) report_conflict('--id', 'useid', '--output', 'outtmpl', val2=opts.outtmpl.get('default')) report_conflict('--remux-video', 'remuxvideo', '--recode-video', 'recodevideo') @@ -446,6 +445,8 @@ def report_deprecation(val, old, new=None): # report_deprecation(opts.writeannotations, '--write-annotations') # It's just that no website has it # Dependent options + opts.date = DateRange.day(opts.date) if opts.date else DateRange(opts.dateafter, opts.datebefore) + if opts.exec_before_dl_cmd: opts.exec_cmd['before_dl'] = opts.exec_before_dl_cmd