diff --git a/src/dialogs.py b/src/dialogs.py index 594f7e336..210983ae0 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -81,7 +81,7 @@ class PreferencesDlg: self.glade.get_widget("spin_port_min").set_value(self.preferences.get("listen_on")[0]) self.glade.get_widget("spin_port_max").set_value(self.preferences.get("listen_on")[1]) self.glade.get_widget("spin_max_upload").set_value(self.preferences.get("max_upload_speed")) - self.glade.get_widget("spin_num_upload").set_value(self.preferences.get("max_number_uploads")) + self.glade.get_widget("spin_num_upload").set_value(float(self.preferences.get("max_number_uploads"))) self.glade.get_widget("spin_max_download").set_value(self.preferences.get("max_download_speed")) self.glade.get_widget("spin_max_connections").set_value(self.preferences.get("max_connections")) self.glade.get_widget("spin_proxy_port").set_value(self.preferences.get("proxy_port")) @@ -155,7 +155,7 @@ class PreferencesDlg: self.preferences.set("use_compact_storage", self.glade.get_widget("chk_compact").get_active()) self.preferences.set("listen_on", [self.glade.get_widget("spin_port_min").get_value(), self.glade.get_widget("spin_port_max").get_value()]) self.preferences.set("max_upload_speed", self.glade.get_widget("spin_max_upload").get_value()) - self.preferences.set("max_number_uploads", self.glade.get_widget("spin_num_upload").get_value()) + self.preferences.set("max_number_uploads", int(self.glade.get_widget("spin_num_upload").get_value())) self.preferences.set("max_download_speed", self.glade.get_widget("spin_max_download").get_value()) self.preferences.set("proxy_port", self.glade.get_widget("spin_proxy_port").get_value()) self.preferences.set("max_connections", int(self.glade.get_widget("spin_max_connections").get_value())) diff --git a/src/pref.py b/src/pref.py index f55dc3a16..8d97a92bf 100644 --- a/src/pref.py +++ b/src/pref.py @@ -68,7 +68,7 @@ DEFAULT_PREFS = { "max_number_uploads" : -1, "max_upload_speed" : -1, "max_upload_speed_bps" : -1, - "max_number_uploads" : -1, + "max_number_uploads" : 4, "pref_rc4" : True, "prioritize_first_last_pieces" : False, "proxy_type" : common.ProxyType.none,