Set desired ratio to 1.0 by default for all torrents.
This commit is contained in:
parent
274ba7e771
commit
62c369bb6f
|
@ -97,7 +97,7 @@ class DesiredRatio:
|
||||||
def ratio_clicked(self, widget):
|
def ratio_clicked(self, widget):
|
||||||
value = widget.get_children()[0].get_text()
|
value = widget.get_children()[0].get_text()
|
||||||
if value == _("Not Set"):
|
if value == _("Not Set"):
|
||||||
value = -1
|
value = 0.0
|
||||||
|
|
||||||
if value == _("Other..."):
|
if value == _("Other..."):
|
||||||
dialog_glade = gtk.glade.XML(deluge.common.get_glade_file("dgtkpopups.glade"))
|
dialog_glade = gtk.glade.XML(deluge.common.get_glade_file("dgtkpopups.glade"))
|
||||||
|
@ -130,7 +130,4 @@ class DesiredRatio:
|
||||||
self.config.get("ratios").pop()
|
self.config.get("ratios").pop()
|
||||||
|
|
||||||
def get_torrent_desired_ratio(self):
|
def get_torrent_desired_ratio(self):
|
||||||
if self.set_ratios.has_key(self.unique_ID):
|
return self.set_ratios.get(self.unique_ID, 1)
|
||||||
return self.set_ratios[self.unique_ID]
|
|
||||||
else:
|
|
||||||
return -1
|
|
||||||
|
|
|
@ -632,7 +632,7 @@ static PyObject *torrent_add_torrent(PyObject *self, PyObject *args)
|
||||||
boost::filesystem::path save_dir_2 (save_dir, empty_name_check);
|
boost::filesystem::path save_dir_2 (save_dir, empty_name_check);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
long ret = internal_add_torrent(name, 0, compact, save_dir_2);
|
long ret = internal_add_torrent(name, 1.0, compact, save_dir_2);
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue