mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-05 18:39:37 +02:00
parent
53973b4d2c
commit
e79969b242
@ -849,22 +849,16 @@ def _real_main(argv=None):
|
|||||||
with YoutubeDL(ydl_opts) as ydl:
|
with YoutubeDL(ydl_opts) as ydl:
|
||||||
actual_use = all_urls or opts.load_info_filename
|
actual_use = all_urls or opts.load_info_filename
|
||||||
|
|
||||||
# Remove cache dir
|
|
||||||
if opts.rm_cachedir:
|
if opts.rm_cachedir:
|
||||||
ydl.cache.remove()
|
ydl.cache.remove()
|
||||||
|
|
||||||
# Update version
|
if opts.update_self and run_update(ydl) and actual_use:
|
||||||
if opts.update_self:
|
|
||||||
# If updater returns True, exit. Required for windows
|
# If updater returns True, exit. Required for windows
|
||||||
if run_update(ydl):
|
return 100, 'ERROR: The program must exit for the update to complete'
|
||||||
if actual_use:
|
|
||||||
return 100, 'ERROR: The program must exit for the update to complete'
|
|
||||||
return
|
|
||||||
|
|
||||||
# Maybe do nothing
|
|
||||||
if not actual_use:
|
if not actual_use:
|
||||||
if opts.update_self or opts.rm_cachedir:
|
if opts.update_self or opts.rm_cachedir:
|
||||||
return
|
return ydl._download_retcode
|
||||||
|
|
||||||
ydl.warn_if_short_id(sys.argv[1:] if argv is None else argv)
|
ydl.warn_if_short_id(sys.argv[1:] if argv is None else argv)
|
||||||
parser.error(
|
parser.error(
|
||||||
|
Loading…
Reference in New Issue
Block a user