1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-05 02:32:44 +01:00

[YoutubeDL] Do not save/restore console title while simulate (closes #16103)

This commit is contained in:
Sergey M․ 2018-04-09 01:03:55 +07:00
parent 069937151e
commit 94c3442e6a
No known key found for this signature in database
GPG Key ID: 2C393E0F18A9236D

View File

@ -532,6 +532,8 @@ def to_console_title(self, message):
def save_console_title(self):
if not self.params.get('consoletitle', False):
return
if self.params.get('simulate', False):
return
if compat_os_name != 'nt' and 'TERM' in os.environ:
# Save the title on stack
self._write_string('\033[22;0t', self._screen_file)
@ -539,6 +541,8 @@ def save_console_title(self):
def restore_console_title(self):
if not self.params.get('consoletitle', False):
return
if self.params.get('simulate', False):
return
if compat_os_name != 'nt' and 'TERM' in os.environ:
# Restore the title from stack
self._write_string('\033[23;0t', self._screen_file)