clean up output a bit
This commit is contained in:
parent
3b344f0ee6
commit
2dfdb98e53
|
@ -644,7 +644,7 @@ class Manager:
|
||||||
# Now to check and see if there is enough free space for the download
|
# Now to check and see if there is enough free space for the download
|
||||||
size = deluge_core.get_torrent_state(unique_ID)["total_size"]
|
size = deluge_core.get_torrent_state(unique_ID)["total_size"]
|
||||||
avail = self.calc_free_space(torrent.save_dir)
|
avail = self.calc_free_space(torrent.save_dir)
|
||||||
print "Torrent Size", size
|
# print "Torrent Size", size
|
||||||
# print "Available Space", avail
|
# print "Available Space", avail
|
||||||
# size = avail + 1 #debug!
|
# size = avail + 1 #debug!
|
||||||
if size > avail: # Not enough free space
|
if size > avail: # Not enough free space
|
||||||
|
@ -686,7 +686,6 @@ class Manager:
|
||||||
# run through queue, remove those that no longer exists
|
# run through queue, remove those that no longer exists
|
||||||
to_delete = []
|
to_delete = []
|
||||||
for queue_item in self.state.queue:
|
for queue_item in self.state.queue:
|
||||||
print "queue_item", queue_item
|
|
||||||
if queue_item not in self.unique_IDs.keys():
|
if queue_item not in self.unique_IDs.keys():
|
||||||
to_delete.append(queue_item)
|
to_delete.append(queue_item)
|
||||||
for del_item in to_delete:
|
for del_item in to_delete:
|
||||||
|
@ -694,9 +693,6 @@ class Manager:
|
||||||
|
|
||||||
assert(len(self.unique_IDs) == len(self.state.torrents))
|
assert(len(self.unique_IDs) == len(self.state.torrents))
|
||||||
|
|
||||||
print "Debug 1", self.unique_IDs, self.state.queue
|
|
||||||
print "Debug 2", len(self.unique_IDs), len(self.state.queue)
|
|
||||||
|
|
||||||
assert(len(self.unique_IDs) == len(self.state.queue))
|
assert(len(self.unique_IDs) == len(self.state.queue))
|
||||||
assert(len(self.unique_IDs) == deluge_core.get_num_torrents())
|
assert(len(self.unique_IDs) == deluge_core.get_num_torrents())
|
||||||
|
|
||||||
|
|
|
@ -1239,15 +1239,14 @@ static PyObject *torrent_pe_settings(PyObject *self, PyObject *args)
|
||||||
libtorrent::pe_settings::enc_level level;
|
libtorrent::pe_settings::enc_level level;
|
||||||
|
|
||||||
PyArg_ParseTuple(args, "iiii", &out, &in, &level, &prefer);
|
PyArg_ParseTuple(args, "iiii", &out, &in, &level, &prefer);
|
||||||
|
|
||||||
M_pe_settings->out_enc_policy = out;
|
M_pe_settings->out_enc_policy = out;
|
||||||
printf("out policy is %d\r\n", M_pe_settings->out_enc_policy);
|
|
||||||
M_pe_settings->in_enc_policy = in;
|
M_pe_settings->in_enc_policy = in;
|
||||||
printf("in policy is %d\r\n", M_pe_settings->in_enc_policy) ;
|
|
||||||
M_pe_settings->allowed_enc_level = level;
|
M_pe_settings->allowed_enc_level = level;
|
||||||
printf("level is %d\r\n", M_pe_settings->allowed_enc_level);
|
|
||||||
M_pe_settings->prefer_rc4 = prefer;
|
M_pe_settings->prefer_rc4 = prefer;
|
||||||
printf("prefer rc4 is %d\r\n", M_pe_settings->prefer_rc4);
|
|
||||||
M_ses->set_pe_settings(*M_pe_settings);
|
M_ses->set_pe_settings(*M_pe_settings);
|
||||||
|
|
||||||
return Py_None;
|
return Py_None;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ class PluginDlg:
|
||||||
def show(self):
|
def show(self):
|
||||||
self.store.clear()
|
self.store.clear()
|
||||||
for plugin in self.plugins.get_available_plugins():
|
for plugin in self.plugins.get_available_plugins():
|
||||||
print plugin
|
#print plugin
|
||||||
if plugin in self.plugins.get_enabled_plugins():
|
if plugin in self.plugins.get_enabled_plugins():
|
||||||
self.store.append( (plugin, True) )
|
self.store.append( (plugin, True) )
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -136,7 +136,7 @@ class DelugeGTK:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
enable_plugins = self.config.get('enabled_plugins', str, default="").split(':')
|
enable_plugins = self.config.get('enabled_plugins', str, default="").split(':')
|
||||||
print enable_plugins
|
|
||||||
for plugin in enable_plugins:
|
for plugin in enable_plugins:
|
||||||
try:
|
try:
|
||||||
self.plugins.enable_plugin(plugin)
|
self.plugins.enable_plugin(plugin)
|
||||||
|
@ -405,8 +405,8 @@ class DelugeGTK:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def torrent_view_clicked(self, widget, event):
|
def torrent_view_clicked(self, widget, event):
|
||||||
print widget
|
# print widget
|
||||||
print event
|
# print event
|
||||||
if event.button == 3:
|
if event.button == 3:
|
||||||
x = int(event.x)
|
x = int(event.x)
|
||||||
y = int(event.y)
|
y = int(event.y)
|
||||||
|
@ -511,7 +511,6 @@ class DelugeGTK:
|
||||||
while itr is not None:
|
while itr is not None:
|
||||||
file_filter.append(not self.file_store.get_value(itr, 0))
|
file_filter.append(not self.file_store.get_value(itr, 0))
|
||||||
itr = self.file_store.iter_next(itr)
|
itr = self.file_store.iter_next(itr)
|
||||||
print file_filter
|
|
||||||
self.manager.set_file_filter(self.get_selected_torrent(), file_filter)
|
self.manager.set_file_filter(self.get_selected_torrent(), file_filter)
|
||||||
|
|
||||||
def show_about_dialog(self, arg=None):
|
def show_about_dialog(self, arg=None):
|
||||||
|
|
Loading…
Reference in New Issue