diff --git a/bindings/python/src/create_torrent.cpp b/bindings/python/src/create_torrent.cpp index 34bee3ee0..53e95432a 100644 --- a/bindings/python/src/create_torrent.cpp +++ b/bindings/python/src/create_torrent.cpp @@ -27,6 +27,11 @@ namespace { set_piece_hashes(c, p, boost::bind(call_python_object, cb, _1)); } + + void add_node(create_torrent& ct, std::string const& addr, int port) + { + ct.add_node(std::make_pair(addr, port)); + } } void bind_create_torrent() @@ -78,7 +83,7 @@ void bind_create_torrent() .def("set_creator", &create_torrent::set_creator) .def("set_hash", &set_hash) .def("add_url_seed", &create_torrent::add_url_seed) - .def("add_node", &create_torrent::add_node) + .def("add_node", &add_node) .def("add_tracker", &create_torrent::add_tracker) .def("set_priv", &create_torrent::set_priv) .def("num_pieces", &create_torrent::num_pieces) diff --git a/docs/python_binding.rst b/docs/python_binding.rst index c60a09dbf..1aa92803e 100644 --- a/docs/python_binding.rst +++ b/docs/python_binding.rst @@ -95,6 +95,8 @@ a list of entries. * torrent_handle::get_download_queue * torrent_handle::piece_availability +``create_torrent::add_node()`` takes two arguments, one string and one integer, +instead of a pair. The string is the address and the integer is the port. .. _`main library reference`: manual.html