mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-09-10 00:58:17 +02:00
Fix delayed title display in --console-title
With Python 3, the titlebar wouldn't get updated for a long time (due to stderr buffering), and when it did, the title would be shown as b'...' representation.
This commit is contained in:
parent
6aabe82035
commit
906417c7c5
@ -208,7 +208,7 @@ def to_cons_title(self, message):
|
|||||||
# 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:
|
||||||
sys.stderr.write('\033]0;%s\007' % message.encode(preferredencoding()))
|
self.to_screen('\033]0;%s\007' % message, skip_eol=True)
|
||||||
|
|
||||||
def fixed_template(self):
|
def fixed_template(self):
|
||||||
"""Checks if the output template is fixed."""
|
"""Checks if the output template is fixed."""
|
||||||
|
Loading…
Reference in New Issue
Block a user