parser.error('max sleep interval must be greater than or equal to min sleep interval')
else:
opts.max_sleep_interval = opts.sleep_interval
+ if opts.sleep_interval_subtitles is not None:
+ if opts.sleep_interval_subtitles < 0:
+ parser.error('subtitles sleep interval must be positive or 0')
+ if opts.sleep_interval_requests is not None:
+ if opts.sleep_interval_requests < 0:
+ parser.error('requests sleep interval must be positive or 0')
if opts.ap_mso and opts.ap_mso not in MSO_INFO:
parser.error('Unsupported TV Provider, use --ap-list-mso to get a list of supported TV Providers')
if opts.overwrites:
any_printing = opts.print_json
download_archive_fn = expand_path(opts.download_archive) if opts.download_archive is not None else opts.download_archive
+ # If JSON is not printed anywhere, but comments are requested, save it to file
+ printing_json = opts.dumpjson or opts.print_json or opts.dump_single_json
+ if opts.getcomments and not printing_json:
+ opts.writeinfojson = True
+
def report_conflict(arg1, arg2):
write_string('WARNING: %s is ignored since %s was given\n' % (arg2, arg1), out=sys.stderr)
if opts.remuxvideo and opts.recodevideo:
'updatetime': opts.updatetime,
'writedescription': opts.writedescription,
'writeannotations': opts.writeannotations,
- 'writeinfojson': opts.writeinfojson or opts.getcomments,
+ 'writeinfojson': opts.writeinfojson,
'allow_playlist_files': opts.allow_playlist_files,
'getcomments': opts.getcomments,
'writethumbnail': opts.writethumbnail,
'fixup': opts.fixup,
'source_address': opts.source_address,
'call_home': opts.call_home,
+ 'sleep_interval_requests': opts.sleep_interval_requests,
'sleep_interval': opts.sleep_interval,
'max_sleep_interval': opts.max_sleep_interval,
'sleep_interval_subtitles': opts.sleep_interval_subtitles,
'postprocessor_args': opts.postprocessor_args,
'cn_verification_proxy': opts.cn_verification_proxy,
'geo_verification_proxy': opts.geo_verification_proxy,
- 'config_location': opts.config_location,
'geo_bypass': opts.geo_bypass,
'geo_bypass_country': opts.geo_bypass_country,
'geo_bypass_ip_block': opts.geo_bypass_ip_block,