diff options
author | Sergey M. <dstftw@gmail.com> | 2015-05-24 21:42:15 +0500 |
---|---|---|
committer | Sergey M. <dstftw@gmail.com> | 2015-05-24 21:42:15 +0500 |
commit | 80240b347e793672909bad21e7781d8b829c6539 (patch) | |
tree | e44e52ba6a0b978109758bd1733cbc76c7de070d /youtube_dl/extractor | |
parent | 2ad5708c43a8672da547fa279e71b20c327793d2 (diff) | |
parent | 04b3b3df05a26a361441754afeb7ff24d0c1f559 (diff) | |
download | youtube-dl-80240b347e793672909bad21e7781d8b829c6539.tar.xz |
Merge pull request #5780 from jaimeMF/remove-nondash
[youtube] Remove the nondash formats (fixes #5774)
Diffstat (limited to 'youtube_dl/extractor')
-rw-r--r-- | youtube_dl/extractor/youtube.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/youtube_dl/extractor/youtube.py b/youtube_dl/extractor/youtube.py index 1f9940cf5..0301682b8 100644 --- a/youtube_dl/extractor/youtube.py +++ b/youtube_dl/extractor/youtube.py @@ -1126,12 +1126,13 @@ class YoutubeIE(YoutubeBaseInfoExtractor): self.report_warning( 'Skipping DASH manifest: %r' % e, video_id) else: - # Hide the formats we found through non-DASH + # Remove the formats we found through non-DASH, they + # contain less info and it can be wrong, because we use + # fixed values (for example the resolution). See + # https://github.com/rg3/youtube-dl/issues/5774 for an + # example. dash_keys = set(df['format_id'] for df in dash_formats) - for f in formats: - if f['format_id'] in dash_keys: - f['format_id'] = 'nondash-%s' % f['format_id'] - f['preference'] = f.get('preference', 0) - 10000 + formats = [f for f in formats if f['format_id'] not in dash_keys] formats.extend(dash_formats) # Check for malformed aspect ratio |