mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2026-02-04 21:17:00 +00:00
[cleanup] Minor cleanup
This commit is contained in:
@@ -3209,7 +3209,7 @@ class YoutubeDL(object):
|
||||
self._format_screen(format_field(f, 'format_id'), self.Styles.ID),
|
||||
format_field(f, 'ext'),
|
||||
self.format_resolution(f),
|
||||
format_field(f, 'fps', '%d'),
|
||||
format_field(f, 'fps', '%3d'),
|
||||
format_field(f, 'dynamic_range', '%s', ignore=(None, 'SDR')).replace('HDR', ''),
|
||||
delim,
|
||||
format_field(f, 'filesize', ' %s', func=format_bytes) + format_field(f, 'filesize_approx', '~%s', func=format_bytes),
|
||||
@@ -3353,7 +3353,7 @@ class YoutubeDL(object):
|
||||
exe_versions, ffmpeg_features = FFmpegPostProcessor.get_versions_and_features(self)
|
||||
ffmpeg_features = {key for key, val in ffmpeg_features.items() if val}
|
||||
if ffmpeg_features:
|
||||
exe_versions['ffmpeg'] += f' (%s)' % ','.join(ffmpeg_features)
|
||||
exe_versions['ffmpeg'] += ' (%s)' % ','.join(ffmpeg_features)
|
||||
|
||||
exe_versions['rtmpdump'] = rtmpdump_version()
|
||||
exe_versions['phantomjs'] = PhantomJSwrapper._version()
|
||||
|
||||
@@ -319,7 +319,9 @@ class FileDownloader(object):
|
||||
msg_template = '%(_downloaded_bytes_str)s at %(_speed_str)s'
|
||||
else:
|
||||
msg_template = '%(_percent_str)s % at %(_speed_str)s ETA %(_eta_str)s'
|
||||
if s.get('fragment_index'):
|
||||
if s.get('fragment_index') and s.get('fragment_count'):
|
||||
msg_template += ' (frag %(fragment_index)s/%(fragment_count)s)'
|
||||
elif s.get('fragment_index'):
|
||||
msg_template += ' (frag %(fragment_index)s)'
|
||||
s['_default_template'] = msg_template % s
|
||||
self._report_progress_status(s)
|
||||
|
||||
@@ -111,7 +111,7 @@ class PicartoVodIE(InfoExtractor):
|
||||
vod_info = self._parse_json(
|
||||
self._search_regex(
|
||||
r'(?s)#vod-player["\']\s*,\s*(\{.+?\})\s*\)', webpage,
|
||||
video_id),
|
||||
'vod player'),
|
||||
video_id, transform_source=js_to_json)
|
||||
|
||||
formats = self._extract_m3u8_formats(
|
||||
|
||||
@@ -2513,7 +2513,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
||||
fmt.get('qualityLabel') or quality.replace('audio_quality_', ''),
|
||||
throttled and 'THROTTLED'))),
|
||||
'source_preference': -10 if not throttled else -1,
|
||||
'fps': int_or_none(fmt.get('fps')),
|
||||
'fps': int_or_none(fmt.get('fps')) or None,
|
||||
'height': height,
|
||||
'quality': q(quality),
|
||||
'tbr': tbr,
|
||||
|
||||
@@ -634,7 +634,7 @@ def parseOpts(overrideArguments=None):
|
||||
action='callback', dest='subtitleslangs', metavar='LANGS', type='str',
|
||||
default=[], callback=_list_from_options_callback,
|
||||
help=(
|
||||
'Languages of the subtitles to download (can be regex) or "all" separated by commas. (Eg: --sub-langs en.*,ja) '
|
||||
'Languages of the subtitles to download (can be regex) or "all" separated by commas. (Eg: --sub-langs "en.*,ja") '
|
||||
'You can prefix the language code with a "-" to exempt it from the requested languages. (Eg: --sub-langs all,-live_chat) '
|
||||
'Use --list-subs for a list of available language tags'))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user