From e0bb4777328a7d1eb96f2d0256fa33ae06b5930d Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Fri, 19 Dec 2025 12:57:55 -0600 Subject: [PATCH] Bypass interactive format selection if no formats are found (#15278) Authored by: bashonly --- yt_dlp/YoutubeDL.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 539b10fe29..b9bc9c9caa 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -3026,6 +3026,10 @@ class YoutubeDL: format_selector = self.format_selector while True: if interactive_format_selection: + if not formats: + # Bypass interactive format selection if no formats & --ignore-no-formats-error + formats_to_download = None + break req_format = input(self._format_screen('\nEnter format selector ', self.Styles.EMPHASIS) + '(Press ENTER for default, or Ctrl+C to quit)' + self._format_screen(': ', self.Styles.EMPHASIS))