mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-22 17:29:19 +00:00
Use libtorrent smart_ban extension
This commit is contained in:
parent
9fc18f0e41
commit
56f1bff6d4
@ -195,6 +195,7 @@ class Core(
|
|||||||
# Load metadata extension
|
# Load metadata extension
|
||||||
self.session.add_extension(lt.create_metadata_plugin)
|
self.session.add_extension(lt.create_metadata_plugin)
|
||||||
self.session.add_extension(lt.create_ut_metadata_plugin)
|
self.session.add_extension(lt.create_ut_metadata_plugin)
|
||||||
|
self.session.add_extension(lt.create_smart_ban_plugin)
|
||||||
|
|
||||||
# Start the AlertManager
|
# Start the AlertManager
|
||||||
self.alerts = AlertManager(self.session)
|
self.alerts = AlertManager(self.session)
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
#include <libtorrent/extensions/ut_pex.hpp>
|
#include <libtorrent/extensions/ut_pex.hpp>
|
||||||
#include <libtorrent/extensions/metadata_transfer.hpp>
|
#include <libtorrent/extensions/metadata_transfer.hpp>
|
||||||
#include <libtorrent/extensions/ut_metadata.hpp>
|
#include <libtorrent/extensions/ut_metadata.hpp>
|
||||||
|
#include <libtorrent/extensions/smart_ban.hpp>
|
||||||
#include <boost/python.hpp>
|
#include <boost/python.hpp>
|
||||||
#include "gil.hpp"
|
#include "gil.hpp"
|
||||||
|
|
||||||
@ -123,6 +124,10 @@ boost::shared_ptr<torrent_plugin> create_ut_pex_plugin_wrapper(torrent* t) {
|
|||||||
return create_ut_pex_plugin(t, NULL);
|
return create_ut_pex_plugin(t, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boost::shared_ptr<torrent_plugin> create_smart_ban_plugin_wrapper(torrent* t) {
|
||||||
|
return create_smart_ban_plugin(t, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
void bind_extensions()
|
void bind_extensions()
|
||||||
{
|
{
|
||||||
class_<
|
class_<
|
||||||
@ -160,6 +165,7 @@ void bind_extensions()
|
|||||||
def("create_ut_pex_plugin", create_ut_pex_plugin_wrapper);
|
def("create_ut_pex_plugin", create_ut_pex_plugin_wrapper);
|
||||||
def("create_metadata_plugin", create_metadata_plugin_wrapper);
|
def("create_metadata_plugin", create_metadata_plugin_wrapper);
|
||||||
def("create_ut_metadata_plugin", create_ut_metadata_plugin_wrapper);
|
def("create_ut_metadata_plugin", create_ut_metadata_plugin_wrapper);
|
||||||
|
def("create_smart_ban_plugin", create_smart_ban_plugin_wrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user