Fix control characters being printed to `--console-title`

Closes #1859
pull/1884/head
pukkandan 2 years ago
parent 3262f8abf2
commit 3efb96a6d1
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

@ -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

Loading…
Cancel
Save