1
0
mirror of https://codeberg.org/polarisfm/youtube-dl synced 2024-11-23 00:54:31 +01:00

Fix for all-formats exception by Valentin Hilbig

This commit is contained in:
Ricardo Garcia 2010-05-30 17:50:56 +02:00
parent 7031008c98
commit 896a6ea9e2

View File

@ -927,17 +927,18 @@ class YoutubeIE(InfoExtractor):
}) })
if all_formats: if all_formats:
quality_index += 1
if quality_index == len(self._available_formats): if quality_index == len(self._available_formats):
# None left to get # None left to get
return return
else: else:
quality_index += 1
format_param = self._available_formats[quality_index] format_param = self._available_formats[quality_index]
continue continue
return return
except UnavailableFormatError, err: except UnavailableFormatError, err:
if best_quality or all_formats: if best_quality or all_formats:
quality_index += 1
if quality_index == len(self._available_formats): if quality_index == len(self._available_formats):
# I don't ever expect this to happen # I don't ever expect this to happen
if not all_formats: if not all_formats:
@ -945,7 +946,6 @@ class YoutubeIE(InfoExtractor):
return return
else: else:
self.report_unavailable_format(video_id, format_param) self.report_unavailable_format(video_id, format_param)
quality_index += 1
format_param = self._available_formats[quality_index] format_param = self._available_formats[quality_index]
continue continue
else: else: