aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/downloader/common.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2015-01-23 12:05:01 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2015-01-23 12:05:01 +0100
commit5f0d813d9395848e92a1c6d83335360652d654c1 (patch)
tree4a7f8ec160f94293c9d5b30404b8cc8a56730e85 /youtube_dl/downloader/common.py
parent501f13fbf3d1f7225f91e3e0ad008df2cd3219f1 (diff)
parentca7a9c1bf7c57d1a5da9a24dd7618d95cb93102a (diff)
Merge remote-tracking branch 'rupertbaxter2/master'
Conflicts: youtube_dl/__init__.py youtube_dl/downloader/common.py
Diffstat (limited to 'youtube_dl/downloader/common.py')
-rw-r--r--youtube_dl/downloader/common.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/youtube_dl/downloader/common.py b/youtube_dl/downloader/common.py
index de6b9311d..82c917d92 100644
--- a/youtube_dl/downloader/common.py
+++ b/youtube_dl/downloader/common.py
@@ -284,6 +284,7 @@ class FileDownloader(object):
"""Download to a filename using the info from info_dict
Return True on success and False otherwise
"""
+
nooverwrites_and_exists = (
self.params.get('nooverwrites', False)
and os.path.exists(encodeFilename(filename))
@@ -305,6 +306,11 @@ class FileDownloader(object):
})
return True
+ sleep_interval = self.params.get('sleep_interval')
+ if sleep_interval:
+ self.to_screen('[download] Sleeping %s seconds...' % sleep_interval)
+ time.sleep(sleep_interval)
+
return self.real_download(filename, info_dict)
def real_download(self, filename, info_dict):