forked from premiere/premiere-libtorrent
expose add_piece to the python bindings
This commit is contained in:
parent
e69b2b8bee
commit
f992053171
|
@ -246,6 +246,11 @@ void set_peer_download_limit(torrent_handle& th, tuple const& ip, int limit)
|
||||||
th.set_peer_download_limit(tuple_to_endpoint(ip), limit);
|
th.set_peer_download_limit(tuple_to_endpoint(ip), limit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void add_piece(torrent_handle& th, int piece, char const *data, int flags)
|
||||||
|
{
|
||||||
|
th.add_piece(piece, data, flags);
|
||||||
|
}
|
||||||
|
|
||||||
void bind_torrent_handle()
|
void bind_torrent_handle()
|
||||||
{
|
{
|
||||||
void (torrent_handle::*force_reannounce0)() const = &torrent_handle::force_reannounce;
|
void (torrent_handle::*force_reannounce0)() const = &torrent_handle::force_reannounce;
|
||||||
|
@ -306,6 +311,7 @@ void bind_torrent_handle()
|
||||||
.def("is_piece_filtered", _(&torrent_handle::is_piece_filtered))
|
.def("is_piece_filtered", _(&torrent_handle::is_piece_filtered))
|
||||||
.def("write_resume_data", _(&torrent_handle::write_resume_data))
|
.def("write_resume_data", _(&torrent_handle::write_resume_data))
|
||||||
#endif
|
#endif
|
||||||
|
.def("add_piece", add_piece)
|
||||||
.def("piece_availability", piece_availability)
|
.def("piece_availability", piece_availability)
|
||||||
.def("piece_priority", _(piece_priority0))
|
.def("piece_priority", _(piece_priority0))
|
||||||
.def("piece_priority", _(piece_priority1))
|
.def("piece_priority", _(piece_priority1))
|
||||||
|
|
Loading…
Reference in New Issue