forked from premiere/premiere-libtorrent
merged python binding fix from RC_0_16
This commit is contained in:
parent
9bdcadb7ad
commit
73fb9ba4b2
|
@ -3,6 +3,7 @@
|
||||||
* fix uTP edge case where udp socket buffer fills up
|
* fix uTP edge case where udp socket buffer fills up
|
||||||
* fix nagle implementation in uTP
|
* fix nagle implementation in uTP
|
||||||
|
|
||||||
|
* fix python binding backwards compatibility in replace_trackers
|
||||||
* fix possible starvation in metadata extension
|
* fix possible starvation in metadata extension
|
||||||
* fix crash when creating torrents and optimizing file order with pad files
|
* fix crash when creating torrents and optimizing file order with pad files
|
||||||
* disable support for large MTUs in uTP until it is more reliable
|
* disable support for large MTUs in uTP until it is more reliable
|
||||||
|
|
|
@ -171,7 +171,27 @@ void replace_trackers(torrent_handle& h, object trackers)
|
||||||
if (entry == handle<>())
|
if (entry == handle<>())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
result.push_back(extract<announce_entry const&>(object(entry)));
|
if (extract<announce_entry>(object(entry)).check())
|
||||||
|
{
|
||||||
|
result.push_back(extract<announce_entry>(object(entry)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dict d;
|
||||||
|
d = extract<dict>(object(entry));
|
||||||
|
std::string url = extract<std::string>(d["url"]);
|
||||||
|
announce_entry ae(url);
|
||||||
|
if (d.has_key("tier"))
|
||||||
|
ae.tier = extract<int>(d["tier"]);
|
||||||
|
if (d.has_key("fail_limit"))
|
||||||
|
ae.fail_limit = extract<int>(d["fail_limit"]);
|
||||||
|
if (d.has_key("source"))
|
||||||
|
ae.source = extract<int>(d["source"]);
|
||||||
|
if (d.has_key("verified"))
|
||||||
|
ae.verified = extract<int>(d["verified"]);
|
||||||
|
if (d.has_key("send_stats"))
|
||||||
|
ae.send_stats = extract<int>(d["send_stats"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
allow_threading_guard guard;
|
allow_threading_guard guard;
|
||||||
|
@ -194,6 +214,7 @@ list trackers(torrent_handle &h)
|
||||||
d["updating"] = i->updating;
|
d["updating"] = i->updating;
|
||||||
d["start_sent"] = i->start_sent;
|
d["start_sent"] = i->start_sent;
|
||||||
d["complete_sent"] = i->complete_sent;
|
d["complete_sent"] = i->complete_sent;
|
||||||
|
d["send_stats"] = i->send_stats;
|
||||||
ret.append(d);
|
ret.append(d);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in New Issue