1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-22 16:44:32 +01:00

Fix incorrect ANSI sequence restoring console title

ANSI sequences use the form "\033[" -- with a left/opening square bracket... [ , not the right/closing one.
This commit is contained in:
Glenn Slayden 2020-09-20 01:35:01 -07:00 committed by GitHub
parent b55715934b
commit d1b64f4a14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -535,7 +535,7 @@ class YoutubeDL(object):
# already of type unicode() # already of type unicode()
ctypes.windll.kernel32.SetConsoleTitleW(ctypes.c_wchar_p(message)) ctypes.windll.kernel32.SetConsoleTitleW(ctypes.c_wchar_p(message))
elif 'TERM' in os.environ: 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): def save_console_title(self):
if not self.params.get('consoletitle', False): if not self.params.get('consoletitle', False):