forked from premiere/premiere-libtorrent
merged python binding fix from RC_0_16
This commit is contained in:
parent
4a7543bdb8
commit
fa6818e757
|
@ -38,6 +38,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
|
||||||
|
|
||||||
|
* expose file_granularity flag to python bindings
|
||||||
* fix DHT memory error
|
* fix DHT memory error
|
||||||
* change semantics of storage allocation to allocate on first write rather
|
* change semantics of storage allocation to allocate on first write rather
|
||||||
than on startup (behaves better with changing file priorities)
|
than on startup (behaves better with changing file priorities)
|
||||||
|
|
|
@ -77,14 +77,14 @@ namespace
|
||||||
|
|
||||||
} // namespace unnamed
|
} // namespace unnamed
|
||||||
|
|
||||||
list file_progress(torrent_handle& handle)
|
list file_progress(torrent_handle& handle, int flags)
|
||||||
{
|
{
|
||||||
std::vector<size_type> p;
|
std::vector<size_type> p;
|
||||||
|
|
||||||
{
|
{
|
||||||
allow_threading_guard guard;
|
allow_threading_guard guard;
|
||||||
p.reserve(handle.torrent_file()->num_files());
|
p.reserve(handle.torrent_file()->num_files());
|
||||||
handle.file_progress(p);
|
handle.file_progress(p, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
list result;
|
list result;
|
||||||
|
@ -376,7 +376,7 @@ void bind_torrent_handle()
|
||||||
.def("get_peer_info", get_peer_info)
|
.def("get_peer_info", get_peer_info)
|
||||||
.def("status", _(&torrent_handle::status), arg("flags") = 0xffffffff)
|
.def("status", _(&torrent_handle::status), arg("flags") = 0xffffffff)
|
||||||
.def("get_download_queue", get_download_queue)
|
.def("get_download_queue", get_download_queue)
|
||||||
.def("file_progress", file_progress)
|
.def("file_progress", file_progress, arg("flags") = 0)
|
||||||
.def("trackers", trackers)
|
.def("trackers", trackers)
|
||||||
.def("replace_trackers", replace_trackers)
|
.def("replace_trackers", replace_trackers)
|
||||||
.def("add_tracker", add_tracker)
|
.def("add_tracker", add_tracker)
|
||||||
|
@ -476,6 +476,10 @@ void bind_torrent_handle()
|
||||||
#endif
|
#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")
|
enum_<torrent_handle::pause_flags_t>("pause_flags_t")
|
||||||
.value("graceful_pause", torrent_handle::graceful_pause)
|
.value("graceful_pause", torrent_handle::graceful_pause)
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue