From 3efb96a6d1e364e7d4906ca786be21e94e1cf472 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Wed, 1 Dec 2021 22:39:57 +0530 Subject: [PATCH] Fix control characters being printed to `--console-title` Closes #1859 --- yt_dlp/YoutubeDL.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 8cbdbb5c0..227098656 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -96,6 +96,7 @@ from .utils import ( ReExtractInfo, register_socks_protocols, RejectedVideoReached, + remove_terminal_sequences, render_table, replace_extension, SameFileError, @@ -776,6 +777,7 @@ class YoutubeDL(object): def to_console_title(self, message): if not self.params.get('consoletitle', False): return + message = remove_terminal_sequences(message) if compat_os_name == 'nt': if ctypes.windll.kernel32.GetConsoleWindow(): # c_wchar_p() might not be necessary if `message` is