mirror of
https://github.com/l1ving/youtube-dl
synced 2025-01-23 07:22:50 +08:00
Bind break_on_existing, improve its logic
This commit is contained in:
parent
fdceeb43ce
commit
674e7d46db
@ -995,11 +995,11 @@ class YoutubeDL(object):
|
||||
}
|
||||
|
||||
reason = self._match_entry(entry, incomplete=True)
|
||||
if reason.endswith('has already been recorded in archive') and self.params.get('break_on_existing'):
|
||||
self.to_screen('[download] stopping downloading because ' + reason)
|
||||
if reason is not None:
|
||||
if reason.endswith('has already been recorded in the archive') and self.params.get('break_on_existing'):
|
||||
print('[download] tried downloading a file that\'s already in the archive, stopping since --break-on-existing is set.')
|
||||
break
|
||||
|
||||
elif reason is not None:
|
||||
else:
|
||||
self.to_screen('[download] ' + reason)
|
||||
continue
|
||||
|
||||
|
@ -393,6 +393,7 @@ def _real_main(argv=None):
|
||||
'youtube_print_sig_code': opts.youtube_print_sig_code,
|
||||
'age_limit': opts.age_limit,
|
||||
'download_archive': download_archive_fn,
|
||||
'break_on_existing': opts.break_on_existing,
|
||||
'cookiefile': opts.cookiefile,
|
||||
'nocheckcertificate': opts.no_check_certificate,
|
||||
'prefer_insecure': opts.prefer_insecure,
|
||||
|
Loading…
Reference in New Issue
Block a user