From 477f9a4ae4dcba4acd4c68e10bc452bc4040e0ca Mon Sep 17 00:00:00 2001 From: P2P-Next Date: Mon, 20 Sep 2010 12:44:09 +0300 Subject: [PATCH] next-share: fix download/upload limit enable code --- instrumentation/next-share/BaseLib/Tools/cmdlinedl.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py b/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py index a6b8cc6..e1f309e 100644 --- a/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py +++ b/instrumentation/next-share/BaseLib/Tools/cmdlinedl.py @@ -124,8 +124,10 @@ def main(): # setup and start download dscfg = DownloadStartupConfig() dscfg.set_dest_dir(output_dir); - dscfg.set_max_speed(DOWNLOAD, download_limit) - dscfg.set_max_speed(UPLOAD, upload_limit) + if download_limit > 0: + dscfg.set_max_speed(DOWNLOAD, download_limit) + if upload_limit > 0: + dscfg.set_max_speed(UPLOAD, upload_limit) if torrentfile_or_url.startswith("http") or torrentfile_or_url.startswith(P2PURL_SCHEME): tdef = TorrentDef.load_from_url(torrentfile_or_url) -- 2.20.1