|
|
@ -48,7 +48,7 @@ from .postprocessor import (
|
|
|
|
get_postprocessor,
|
|
|
|
get_postprocessor,
|
|
|
|
)
|
|
|
|
)
|
|
|
|
from .postprocessor.ffmpeg import resolve_mapping as resolve_recode_mapping
|
|
|
|
from .postprocessor.ffmpeg import resolve_mapping as resolve_recode_mapping
|
|
|
|
from .update import detect_variant
|
|
|
|
from .update import REPOSITORY, current_git_head, detect_variant
|
|
|
|
from .utils import (
|
|
|
|
from .utils import (
|
|
|
|
DEFAULT_OUTTMPL,
|
|
|
|
DEFAULT_OUTTMPL,
|
|
|
|
IDENTITY,
|
|
|
|
IDENTITY,
|
|
|
@ -3314,6 +3314,12 @@ class YoutubeDL:
|
|
|
|
return info_dict
|
|
|
|
return info_dict
|
|
|
|
info_dict.setdefault('epoch', int(time.time()))
|
|
|
|
info_dict.setdefault('epoch', int(time.time()))
|
|
|
|
info_dict.setdefault('_type', 'video')
|
|
|
|
info_dict.setdefault('_type', 'video')
|
|
|
|
|
|
|
|
info_dict.setdefault('_version', {
|
|
|
|
|
|
|
|
'version': __version__,
|
|
|
|
|
|
|
|
'current_git_head': current_git_head(),
|
|
|
|
|
|
|
|
'release_git_head': RELEASE_GIT_HEAD,
|
|
|
|
|
|
|
|
'repository': REPOSITORY,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
if remove_private_keys:
|
|
|
|
if remove_private_keys:
|
|
|
|
reject = lambda k, v: v is None or k.startswith('__') or k in {
|
|
|
|
reject = lambda k, v: v is None or k.startswith('__') or k in {
|
|
|
@ -3678,7 +3684,8 @@ class YoutubeDL:
|
|
|
|
if VARIANT not in (None, 'pip'):
|
|
|
|
if VARIANT not in (None, 'pip'):
|
|
|
|
source += '*'
|
|
|
|
source += '*'
|
|
|
|
write_debug(join_nonempty(
|
|
|
|
write_debug(join_nonempty(
|
|
|
|
'yt-dlp version', __version__,
|
|
|
|
f'{"yt-dlp" if REPOSITORY == "yt-dlp/yt-dlp" else REPOSITORY} version',
|
|
|
|
|
|
|
|
__version__,
|
|
|
|
f'[{RELEASE_GIT_HEAD}]' if RELEASE_GIT_HEAD else '',
|
|
|
|
f'[{RELEASE_GIT_HEAD}]' if RELEASE_GIT_HEAD else '',
|
|
|
|
'' if source == 'unknown' else f'({source})',
|
|
|
|
'' if source == 'unknown' else f'({source})',
|
|
|
|
delim=' '))
|
|
|
|
delim=' '))
|
|
|
@ -3694,18 +3701,8 @@ class YoutubeDL:
|
|
|
|
if self.params['compat_opts']:
|
|
|
|
if self.params['compat_opts']:
|
|
|
|
write_debug('Compatibility options: %s' % ', '.join(self.params['compat_opts']))
|
|
|
|
write_debug('Compatibility options: %s' % ', '.join(self.params['compat_opts']))
|
|
|
|
|
|
|
|
|
|
|
|
if source == 'source':
|
|
|
|
if current_git_head():
|
|
|
|
try:
|
|
|
|
write_debug(f'Git HEAD: {current_git_head()}')
|
|
|
|
stdout, _, _ = Popen.run(
|
|
|
|
|
|
|
|
['git', 'rev-parse', '--short', 'HEAD'],
|
|
|
|
|
|
|
|
text=True, cwd=os.path.dirname(os.path.abspath(__file__)),
|
|
|
|
|
|
|
|
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
|
|
|
|
|
|
if re.fullmatch('[0-9a-f]+', stdout.strip()):
|
|
|
|
|
|
|
|
write_debug(f'Git HEAD: {stdout.strip()}')
|
|
|
|
|
|
|
|
except Exception:
|
|
|
|
|
|
|
|
with contextlib.suppress(Exception):
|
|
|
|
|
|
|
|
sys.exc_clear()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
write_debug(system_identifier())
|
|
|
|
write_debug(system_identifier())
|
|
|
|
|
|
|
|
|
|
|
|
exe_versions, ffmpeg_features = FFmpegPostProcessor.get_versions_and_features(self)
|
|
|
|
exe_versions, ffmpeg_features = FFmpegPostProcessor.get_versions_and_features(self)
|
|
|
|