merged python binding fix from RC_0_16

This commit is contained in:
Arvid Norberg 2014-01-17 05:35:58 +00:00
parent 4a7543bdb8
commit fa6818e757
2 changed files with 8 additions and 3 deletions

View File

@ -38,6 +38,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* expose file_granularity flag to python bindings
* fix DHT memory error
* change semantics of storage allocation to allocate on first write rather
than on startup (behaves better with changing file priorities)

View File

@ -77,14 +77,14 @@ namespace
} // namespace unnamed
list file_progress(torrent_handle& handle)
list file_progress(torrent_handle& handle, int flags)
{
std::vector<size_type> p;
{
allow_threading_guard guard;
p.reserve(handle.torrent_file()->num_files());
handle.file_progress(p);
handle.file_progress(p, flags);
}
list result;
@ -376,7 +376,7 @@ void bind_torrent_handle()
.def("get_peer_info", get_peer_info)
.def("status", _(&torrent_handle::status), arg("flags") = 0xffffffff)
.def("get_download_queue", get_download_queue)
.def("file_progress", file_progress)
.def("file_progress", file_progress, arg("flags") = 0)
.def("trackers", trackers)
.def("replace_trackers", replace_trackers)
.def("add_tracker", add_tracker)
@ -476,6 +476,10 @@ void bind_torrent_handle()
#endif
;
enum_<torrent_handle::file_progress_flags_t>("file_progress_flags")
.value("piece_granularity", torrent_handle::piece_granularity)
;
enum_<torrent_handle::pause_flags_t>("pause_flags_t")
.value("graceful_pause", torrent_handle::graceful_pause)
;