mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-26 10:05:19 +00:00
try to fix persistent.state pooping
This commit is contained in:
parent
cd2f45da92
commit
925416dded
@ -1778,8 +1778,7 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
||||
if (PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
torrent_handle& h = M_torrents->at(index).handle;
|
||||
if (h.is_valid()){
|
||||
if (M_torrents->at(index).handle.is_valid()){
|
||||
std::vector<libtorrent::announce_entry> trackerlist;
|
||||
std::istringstream trackers(tracker);
|
||||
std::string line;
|
||||
@ -1787,8 +1786,8 @@ static PyObject *torrent_replace_trackers(PyObject *self, PyObject *args)
|
||||
libtorrent::announce_entry a_entry(line);
|
||||
trackerlist.push_back(a_entry);
|
||||
}
|
||||
h.replace_trackers(trackerlist);
|
||||
h.force_reannounce();
|
||||
M_torrents->at(index).handle.replace_trackers(trackerlist);
|
||||
M_torrents->at(index).handle.force_reannounce();
|
||||
}
|
||||
Py_INCREF(Py_None); return Py_None;
|
||||
}
|
||||
|
@ -947,11 +947,17 @@ window, please enter your password"))
|
||||
unique_id = self.manager.get_torrent_unique_id(torrent)
|
||||
try:
|
||||
if self.manager.unique_IDs[unique_id].trackers:
|
||||
self.manager.replace_trackers(unique_id, \
|
||||
try:
|
||||
self.manager.replace_trackers(unique_id, \
|
||||
self.manager.unique_IDs[unique_id].trackers)
|
||||
except:
|
||||
pass
|
||||
if self.manager.unique_IDs[unique_id].uploaded_memory:
|
||||
self.manager.unique_IDs[unique_id].initial_uploaded_memory \
|
||||
try:
|
||||
self.manager.unique_IDs[unique_id].initial_uploaded_memory \
|
||||
= self.manager.unique_IDs[unique_id].uploaded_memory
|
||||
except:
|
||||
pass
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user