merged python fix from RC_0_16
This commit is contained in:
parent
22b1c968a4
commit
f1cd525ec1
|
@ -20,6 +20,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
|
||||||
|
|
||||||
|
* add missing functions to python binding (flush_cache() and remap_files())
|
||||||
* improve handling of filenames that are invalid on windows
|
* improve handling of filenames that are invalid on windows
|
||||||
* support 'implied_port' in DHT announce_peer
|
* support 'implied_port' in DHT announce_peer
|
||||||
* don't use pool allocator for disk blocks (cache may now return pages to the kernel)
|
* don't use pool allocator for disk blocks (cache may now return pages to the kernel)
|
||||||
|
|
|
@ -392,6 +392,7 @@ void bind_torrent_handle()
|
||||||
.def("name", _(&torrent_handle::name))
|
.def("name", _(&torrent_handle::name))
|
||||||
.def("set_upload_mode", _(&torrent_handle::set_upload_mode))
|
.def("set_upload_mode", _(&torrent_handle::set_upload_mode))
|
||||||
.def("set_share_mode", _(&torrent_handle::set_share_mode))
|
.def("set_share_mode", _(&torrent_handle::set_share_mode))
|
||||||
|
.def("flush_cache", &torrent_handle::flush_cache)
|
||||||
.def("set_upload_limit", _(&torrent_handle::set_upload_limit))
|
.def("set_upload_limit", _(&torrent_handle::set_upload_limit))
|
||||||
.def("upload_limit", _(&torrent_handle::upload_limit))
|
.def("upload_limit", _(&torrent_handle::upload_limit))
|
||||||
.def("set_download_limit", _(&torrent_handle::set_download_limit))
|
.def("set_download_limit", _(&torrent_handle::set_download_limit))
|
||||||
|
|
|
@ -52,7 +52,14 @@ namespace
|
||||||
return i.end_files();
|
return i.end_files();
|
||||||
}
|
}
|
||||||
|
|
||||||
//list files(torrent_info const& ti, bool storage) {
|
void remap_files(torrent_info& ti, list files) {
|
||||||
|
file_storage st;
|
||||||
|
for (int i = 0, e = len(files); i < e; ++i)
|
||||||
|
st.add_file(extract<file_entry>(files[i]));
|
||||||
|
|
||||||
|
ti.remap_files(st);
|
||||||
|
}
|
||||||
|
|
||||||
list files(torrent_info const& ti, bool storage) {
|
list files(torrent_info const& ti, bool storage) {
|
||||||
list result;
|
list result;
|
||||||
|
|
||||||
|
@ -138,6 +145,7 @@ void bind_torrent_info()
|
||||||
.def(init<std::wstring, int>((arg("file"), arg("flags") = 0)))
|
.def(init<std::wstring, int>((arg("file"), arg("flags") = 0)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
.def("remap_files", &remap_files)
|
||||||
.def("add_tracker", &torrent_info::add_tracker, arg("url"))
|
.def("add_tracker", &torrent_info::add_tracker, arg("url"))
|
||||||
.def("add_url_seed", &torrent_info::add_url_seed)
|
.def("add_url_seed", &torrent_info::add_url_seed)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue