diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-20 03:02:25 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-05-20 06:01:09 +0530 |
commit | 53973b4d2cb349d39d6f240911142b330d1dd80d (patch) | |
tree | 91527a9e54f0bfa0339da481222402506921e1c1 /yt_dlp/YoutubeDL.py | |
parent | b801cd7179c9546f4054dc534ec4b713e09976a7 (diff) | |
download | hypervideo-pre-53973b4d2cb349d39d6f240911142b330d1dd80d.tar.lz hypervideo-pre-53973b4d2cb349d39d6f240911142b330d1dd80d.tar.xz hypervideo-pre-53973b4d2cb349d39d6f240911142b330d1dd80d.zip |
[utils] Fix bug in 0b9c08b47bb5e95c21b067044ace4e824d19a9c2
* Cache of `supports_terminal_sequences` must be reset after enabling VT mode
* and move `windows_enable_vt_mode` to utils to avoid cyclic imports
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 749cf9402..3dc11463c 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -33,7 +33,6 @@ from .compat import ( compat_str, compat_urllib_error, compat_urllib_request, - windows_enable_vt_mode, ) from .cookies import load_cookies from .downloader import FFmpegFD, get_suitable_downloader, shorten_protocol_name @@ -142,6 +141,7 @@ from .utils import ( url_basename, variadic, version_tuple, + windows_enable_vt_mode, write_json_file, write_string, ) @@ -3605,7 +3605,7 @@ class YoutubeDL: def get_encoding(stream): ret = str(getattr(stream, 'encoding', 'missing (%s)' % type(stream).__name__)) if not supports_terminal_sequences(stream): - from .compat import WINDOWS_VT_MODE # Must be imported locally + from .utils import WINDOWS_VT_MODE # Must be imported locally ret += ' (No VT)' if WINDOWS_VT_MODE is False else ' (No ANSI)' return ret |