diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2021-09-24 06:31:43 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-24 06:31:43 +0530 |
commit | 4c88ff87fc0e84659f7b6a7a88997eb6851125a0 (patch) | |
tree | 9368500645e99e08ea6acb87efa8ad6db714f33f /yt_dlp/YoutubeDL.py | |
parent | e27cc5d864f8b7be27357e5dd2d32493fd9e5829 (diff) | |
download | hypervideo-pre-4c88ff87fc0e84659f7b6a7a88997eb6851125a0.tar.lz hypervideo-pre-4c88ff87fc0e84659f7b6a7a88997eb6851125a0.tar.xz hypervideo-pre-4c88ff87fc0e84659f7b6a7a88997eb6851125a0.zip |
[build] Improve release process (#880)
* Automate more of the release process by animelover1984, pukkandan - closes #823
* Fix sha256 by nihil-admirari - closes #385
* Bring back brew taps by nao20010128nao #865
* Provide `--onedir` zip for windows by pukkandan - Closes #1024, #661, #705 and #890
Authored by: pukkandan, animelover1984, nihil-admirari, nao20010128nao
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r-- | yt_dlp/YoutubeDL.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 8df8f1675..2258e22af 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -27,7 +27,6 @@ import traceback import random from string import ascii_letters -from zipimport import zipimporter from .compat import ( compat_basestring, @@ -143,6 +142,7 @@ from .postprocessor import ( FFmpegPostProcessor, MoveFilesAfterDownloadPP, ) +from .update import detect_variant from .version import __version__ if compat_os_name == 'nt': @@ -3266,12 +3266,8 @@ class YoutubeDL(object): self.get_encoding())) write_string(encoding_str, encoding=None) - source = ( - '(exe)' if hasattr(sys, 'frozen') - else '(zip)' if isinstance(globals().get('__loader__'), zipimporter) - else '(source)' if os.path.basename(sys.argv[0]) == '__main__.py' - else '') - self._write_string('[debug] yt-dlp version %s %s\n' % (__version__, source)) + source = detect_variant() + self._write_string('[debug] yt-dlp version %s%s\n' % (__version__, '' if source == 'unknown' else f' ({source})')) if _LAZY_LOADER: self._write_string('[debug] Lazy loading extractors enabled\n') if _PLUGIN_CLASSES: |