Load ut_metadata extension

This commit is contained in:
Andrew Resch 2008-09-14 18:32:00 +00:00
parent fb0f1b9319
commit 3217113583
2 changed files with 8 additions and 1 deletions

View File

@ -181,7 +181,8 @@ class Core(
# Load metadata extension
self.session.add_extension(lt.create_metadata_plugin)
self.session.add_extension(lt.create_ut_metadata_plugin)
# Start the AlertManager
self.alerts = AlertManager(self.session)

View File

@ -8,6 +8,7 @@
#include <libtorrent/peer_connection.hpp>
#include <libtorrent/extensions/ut_pex.hpp>
#include <libtorrent/extensions/metadata_transfer.hpp>
#include <libtorrent/extensions/ut_metadata.hpp>
#include <boost/python.hpp>
#include "gil.hpp"
@ -114,6 +115,10 @@ boost::shared_ptr<torrent_plugin> create_metadata_plugin_wrapper(torrent* t) {
return create_metadata_plugin(t, NULL);
}
boost::shared_ptr<torrent_plugin> create_ut_metadata_plugin_wrapper(torrent *t) {
return create_ut_metadata_plugin(t, NULL);
}
boost::shared_ptr<torrent_plugin> create_ut_pex_plugin_wrapper(torrent* t) {
return create_ut_pex_plugin(t, NULL);
}
@ -154,6 +159,7 @@ void bind_extensions()
class_<torrent_plugin, boost::shared_ptr<torrent_plugin> >("torrent_plugin", no_init);
def("create_ut_pex_plugin", create_ut_pex_plugin_wrapper);
def("create_metadata_plugin", create_metadata_plugin_wrapper);
def("create_ut_metadata_plugin", create_ut_metadata_plugin_wrapper);
}