Skip to content

Commit

Permalink
Fix recursion error in f46e2f9
Browse files Browse the repository at this point in the history
  • Loading branch information
pukkandan committed Jan 3, 2022
1 parent 61e9d92 commit be72c62
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions yt_dlp/YoutubeDL.py
Original file line number Diff line number Diff line change
Expand Up @@ -2552,7 +2552,6 @@ def is_wellformed(f):
continue
break

info_dict['requested_downloads'] = formats_to_download
best_format = formats_to_download[-1] if formats_to_download else {}
if not formats_to_download:
if not self.params.get('ignore_no_formats_error'):
Expand Down Expand Up @@ -2589,14 +2588,15 @@ def is_wellformed(f):
assert write_archive.issubset({True, False, 'ignore'})
if True in write_archive and False not in write_archive:
self.record_download_archive(info_dict)

info_dict['requested_downloads'] = formats_to_download
for pp in self._pps['after_video']:
info_dict = self.run_pp(pp, info_dict)
if max_downloads_reached:
raise MaxDownloadsReached()

# We update the info dict with the selected best quality format (backwards compatibility)
if formats_to_download:
info_dict.update(best_format)
info_dict.update(best_format)
return info_dict

def process_subtitles(self, video_id, normal_subtitles, automatic_captions):
Expand Down

0 comments on commit be72c62

Please sign in to comment.