]> jfr.im git - yt-dlp.git/blobdiff - yt_dlp/__init__.py
[update] Add option `--update-to`, including to nightly (#6220)
[yt-dlp.git] / yt_dlp / __init__.py
index 255b31735181b7c91909428b1855b707055caed6..15c6e997f861ed397bf6ed19820033d7cb74252f 100644 (file)
@@ -318,10 +318,6 @@ def validate_outtmpl(tmpl, msg):
     if outtmpl_default == '':
         opts.skip_download = None
         del opts.outtmpl['default']
-    if outtmpl_default and not os.path.splitext(outtmpl_default)[1] and opts.extractaudio:
-        raise ValueError(
-            'Cannot download a video and extract audio into the same file! '
-            f'Use "{outtmpl_default}.%(ext)s" instead of "{outtmpl_default}" as the output template')
 
     def parse_chapters(name, value):
         chapters, ranges = [], []
@@ -935,7 +931,7 @@ def _real_main(argv=None):
         if opts.rm_cachedir:
             ydl.cache.remove()
 
-        updater = Updater(ydl)
+        updater = Updater(ydl, opts.update_self if isinstance(opts.update_self, str) else None)
         if opts.update_self and updater.update() and actual_use:
             if updater.cmd:
                 return updater.restart()