From cd51a4b508c1d167f94ad409f3803f4a6fd52cd6 Mon Sep 17 00:00:00 2001 From: FooBarQuaxx Date: Fri, 18 Nov 2016 23:09:23 +0300 Subject: [PATCH] Fix bytes options option definition --- youtube_dl/options.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/youtube_dl/options.py b/youtube_dl/options.py index fc2ea4885..e7ab654c5 100644 --- a/youtube_dl/options.py +++ b/youtube_dl/options.py @@ -273,12 +273,12 @@ def parseOpts(overrideArguments=None): selection.add_option( '--min-filesize', metavar='SIZE', dest='min_filesize', default=None, - action='callback', callback=_bytes_option_callback, + type=str, action='callback', callback=_bytes_option_callback, help='Do not download any videos smaller than SIZE (e.g. 50k or 44.6m)') selection.add_option( '--max-filesize', metavar='SIZE', dest='max_filesize', default=None, - action='callback', callback=_bytes_option_callback, + type=str, action='callback', callback=_bytes_option_callback, help='Do not download any videos larger than SIZE (e.g. 50k or 44.6m)') selection.add_option( '--date', @@ -444,7 +444,7 @@ def parseOpts(overrideArguments=None): downloader.add_option( '-r', '--limit-rate', '--rate-limit', dest='ratelimit', metavar='RATE', - action='callback', callback=_bytes_option_callback, + type=str, action='callback', callback=_bytes_option_callback, help='Maximum download rate in bytes per second (e.g. 50K or 4.2M)') downloader.add_option( '-R', '--retries', @@ -465,7 +465,7 @@ def parseOpts(overrideArguments=None): downloader.add_option( '--buffer-size', dest='buffersize', metavar='SIZE', default='1024', - action='callback', callback=_bytes_option_callback, + type=str, action='callback', callback=_bytes_option_callback, help='Size of download buffer (e.g. 1024 or 16K) (default is %default)') downloader.add_option( '--no-resize-buffer',