mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-13 21:14:55 +00:00
one for max ratio queuing and one for torrent pieces - micah
This commit is contained in:
parent
5c0a649a65
commit
a5d5cb7f4b
@ -507,7 +507,7 @@ class Manager:
|
||||
|
||||
for unique_ID in self.unique_IDs:
|
||||
torrent_state = self.get_core_torrent_state(unique_ID)
|
||||
if torrent_state['is_seed']:
|
||||
if torrent_state['is_seed'] and not torrent_state['is_paused']:
|
||||
ratio = self.calc_ratio(unique_ID, torrent_state)
|
||||
if ratio >= self.get_pref('auto_seed_ratio'):
|
||||
self.queue_bottom(unique_ID, enforce_queue=False) # don't recurse!
|
||||
|
@ -763,6 +763,8 @@ static PyObject *torrent_has_piece(PyObject *self, PyObject *args)
|
||||
return NULL;
|
||||
|
||||
torrent_status s = M_torrents->at(index).handle.status();
|
||||
if ((*s.pieces).size() == 0)
|
||||
return Py_BuildValue("b", false);
|
||||
has_piece = internal_has_piece(*s.pieces, piece_index);
|
||||
return Py_BuildValue("b", has_piece);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user