diff options
author | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-04-17 17:54:37 +0200 |
---|---|---|
committer | Ricardo Garcia <sarbalap+freshmeat@gmail.com> | 2010-10-31 11:27:01 +0100 |
commit | 2bebb386b86963ed644a6f4196d97b82902e218f (patch) | |
tree | 4be1a287cf1f0a51e8f80923af996ab4a5983cf8 | |
parent | 7e58d56888539c87dc3d8747cd958e3c57acee6f (diff) |
Make "all-formats" and "best-quality" download the version without specific format too
-rwxr-xr-x | youtube-dl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/youtube-dl b/youtube-dl index 64f62e8a1..d2bd0bf5f 100755 --- a/youtube-dl +++ b/youtube-dl @@ -891,21 +891,18 @@ class YoutubeIE(InfoExtractor): }) if all_formats: - if quality_index == len(self._available_formats) - 1: + if quality_index == len(self._available_formats): # None left to get return else: quality_index += 1 format_param = self._available_formats[quality_index] - if format_param == None: - return continue - return except UnavailableFormatError, err: if best_quality or all_formats: - if quality_index == len(self._available_formats) - 1: + if quality_index == len(self._available_formats): # I don't ever expect this to happen if not all_formats: self._downloader.trouble(u'ERROR: no known formats available for video') @@ -914,8 +911,6 @@ class YoutubeIE(InfoExtractor): self.report_unavailable_format(video_id, format_param) quality_index += 1 format_param = self._available_formats[quality_index] - if format_param == None: - return continue else: self._downloader.trouble('ERROR: format not available for video') |