1
0
Fork 0
mirror of https://github.com/LucBerge/yt-dlp.git synced 2025-03-17 19:57:52 +03:00

[cleanup] Minor fixes (See desc)

* [youtube] Fix `--youtube-skip-dash-manifest`
* [build] Use `$()` in `Makefile`. Closes 
* Fix bug in 385ffb467b
* Fix bug in 43d7f5a5d0
* [cleanup] Remove unnecessary `utf-8` from `str.encode`/`bytes.decode`
* [utils] LazyList: Expose unnecessarily "protected" attributes
and other minor cleanup
This commit is contained in:
pukkandan 2022-05-09 17:24:28 +05:30
parent d239db0306
commit 0f06bcd759
No known key found for this signature in database
GPG key ID: 7EEE9E1E817D0A39
35 changed files with 124 additions and 136 deletions
yt_dlp/extractor

View file

@ -3173,7 +3173,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
# Eg: __2ABJjxzNo, ySuUZEjARPY
is_damaged = try_get(fmt, lambda x: float(x['approxDurationMs']) / duration < 500)
if is_damaged:
self.report_warning(f'{video_id}: Some formats are possibly damaged. They will be deprioritized', only_once=True)
self.report_warning(
f'{video_id}: Some formats are possibly damaged. They will be deprioritized', only_once=True)
dct = {
'asr': int_or_none(fmt.get('audioSampleRate')),
'filesize': int_or_none(fmt.get('contentLength')),
@ -3222,6 +3223,8 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
skip_manifests = self._configuration_arg('skip')
if not self.get_param('youtube_include_hls_manifest', True):
skip_manifests.append('hls')
if not self.get_param('youtube_include_dash_manifest', True):
skip_manifests.append('dash')
get_dash = 'dash' not in skip_manifests and (
not is_live or live_from_start or self._configuration_arg('include_live_dash'))
get_hls = not live_from_start and 'hls' not in skip_manifests