diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2015-01-23 12:05:01 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2015-01-23 12:05:01 +0100 |
commit | 5f0d813d9395848e92a1c6d83335360652d654c1 (patch) | |
tree | 4a7f8ec160f94293c9d5b30404b8cc8a56730e85 /youtube_dl/__init__.py | |
parent | 501f13fbf3d1f7225f91e3e0ad008df2cd3219f1 (diff) | |
parent | ca7a9c1bf7c57d1a5da9a24dd7618d95cb93102a (diff) |
Merge remote-tracking branch 'rupertbaxter2/master'
Conflicts:
youtube_dl/__init__.py
youtube_dl/downloader/common.py
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r-- | youtube_dl/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index ddf6260d1..ea1660452 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -132,6 +132,11 @@ def _real_main(argv=None): if numeric_limit is None: parser.error('invalid rate limit specified') opts.ratelimit = numeric_limit + if opts.sleepinterval is not None: + try: + opts.sleepinterval = abs(int(opts.sleepinterval)) + except ValueError: + parser.error(u'invalid sleep interval specified') if opts.min_filesize is not None: numeric_limit = FileDownloader.parse_bytes(opts.min_filesize) if numeric_limit is None: @@ -267,6 +272,7 @@ def _real_main(argv=None): 'restrictfilenames': opts.restrictfilenames, 'ignoreerrors': opts.ignoreerrors, 'ratelimit': opts.ratelimit, + 'sleepinterval': opts.sleepinterval, 'nooverwrites': opts.nooverwrites, 'retries': opts.retries, 'buffersize': opts.buffersize, @@ -329,6 +335,7 @@ def _real_main(argv=None): 'fixup': opts.fixup, 'source_address': opts.source_address, 'call_home': opts.call_home, + 'sleep_interval': opts.sleep_interval, } with YoutubeDL(ydl_opts) as ydl: |