about summary refs log tree commit diff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2018-04-09 01:03:55 +0700
committerSergey M․ <dstftw@gmail.com>2018-04-09 01:04:22 +0700
commit94c3442e6ae176b01b3b5eae0a3adc355319b569 (patch)
treead7ee1fab014f90fb5196f57492c1358f3d7195e /youtube_dl/YoutubeDL.py
parent069937151e429a2127569910d204c03eec167f0d (diff)
downloadyoutube-dl-94c3442e6ae176b01b3b5eae0a3adc355319b569.tar.gz
youtube-dl-94c3442e6ae176b01b3b5eae0a3adc355319b569.tar.xz
youtube-dl-94c3442e6ae176b01b3b5eae0a3adc355319b569.zip
[YoutubeDL] Do not save/restore console title while simulate (closes #16103)
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rwxr-xr-xyoutube_dl/YoutubeDL.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index 523dd1f7d..fca4999eb 100755
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -532,6 +532,8 @@ class YoutubeDL(object):
     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 @@ class YoutubeDL(object):
     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)