aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/YoutubeDL.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-10-04 01:34:04 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-10-04 01:48:14 +0530
commita057779d5e706f7bb8721a6c46cca47f0925f682 (patch)
tree51d5f484e76d654101d461ec8e42acbc24cf93ef /yt_dlp/YoutubeDL.py
parent7474e4531e5911b04030ee52ff93ca4f2527490d (diff)
downloadhypervideo-pre-a057779d5e706f7bb8721a6c46cca47f0925f682.tar.lz
hypervideo-pre-a057779d5e706f7bb8721a6c46cca47f0925f682.tar.xz
hypervideo-pre-a057779d5e706f7bb8721a6c46cca47f0925f682.zip
[cleanup] Minor fixes
Closes #5129, Closes #4982
Diffstat (limited to 'yt_dlp/YoutubeDL.py')
-rw-r--r--yt_dlp/YoutubeDL.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index bc6de4926..53681149e 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -2426,6 +2426,8 @@ class YoutubeDL:
for key in live_keys:
if info_dict.get(key) is None:
info_dict[key] = (live_status == key)
+ if live_status == 'post_live':
+ info_dict['was_live'] = True
# Auto generate title fields corresponding to the *_number fields when missing
# in order to always have clean titles. This is very common for TV series.
@@ -3683,6 +3685,8 @@ class YoutubeDL:
if not self.params.get('verbose'):
return
+ from . import _IN_CLI # Must be delayed import
+
# These imports can be slow. So import them only as needed
from .extractor.extractors import _LAZY_LOADER
from .extractor.extractors import _PLUGIN_CLASSES as plugin_extractors
@@ -3719,6 +3723,7 @@ class YoutubeDL:
__version__,
f'[{RELEASE_GIT_HEAD}]' if RELEASE_GIT_HEAD else '',
'' if source == 'unknown' else f'({source})',
+ '' if _IN_CLI else 'API',
delim=' '))
if not _LAZY_LOADER:
if os.environ.get('YTDLP_NO_LAZY_EXTRACTORS'):