This commit is contained in:
Glenn Slayden 2020-10-21 05:00:03 +02:00 committed by GitHub
commit a37122755d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -2002,6 +2002,9 @@ class YoutubeDL(object):
self.report_error('postprocessing: %s' % str(err))
return
self.record_download_archive(info_dict)
max_downloads = self.params.get('max_downloads')
if max_downloads is not None and self._num_downloads >= int(max_downloads):
raise MaxDownloadsReached()
def download(self, url_list):
"""Download a given list of URLs."""