From d1b64f4a14ffc4f182881a69d3a1488388bc419a Mon Sep 17 00:00:00 2001 From: Glenn Slayden <5589855+glenn-slayden@users.noreply.github.com> Date: Sun, 20 Sep 2020 01:35:01 -0700 Subject: [PATCH] Fix incorrect ANSI sequence restoring console title ANSI sequences use the form "\033[" -- with a left/opening square bracket... [ , not the right/closing one. --- youtube_dl/YoutubeDL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 19370f62b..88a66ffe9 100755 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -535,7 +535,7 @@ class YoutubeDL(object): # already of type unicode() ctypes.windll.kernel32.SetConsoleTitleW(ctypes.c_wchar_p(message)) elif 'TERM' in os.environ: - self._write_string('\033]0;%s\007' % message, self._screen_file) + self._write_string('\033[0;%s\007' % message, self._screen_file) def save_console_title(self): if not self.params.get('consoletitle', False):