mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-03 20:52:53 +08:00
fix behavior when max_files not set
This commit is contained in:
parent
fa0d627720
commit
1080820b50
@ -702,8 +702,9 @@ class FileDownloader(object):
|
|||||||
"""Process a single dictionary returned by an InfoExtractor."""
|
"""Process a single dictionary returned by an InfoExtractor."""
|
||||||
filename = self.prepare_filename(info_dict)
|
filename = self.prepare_filename(info_dict)
|
||||||
|
|
||||||
# Stop downloading at max_files
|
# Stop downloading at max_files (0 means no limit)
|
||||||
if int(self._num_downloads) > int(self.params.get('max_files', 0)):
|
if int(self.params.get('max_files', 0)) != 0 and \
|
||||||
|
(int(self._num_downloads) > int(self.params.get('max_files', 0))):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Forced printings
|
# Forced printings
|
||||||
|
Loading…
Reference in New Issue
Block a user