Prevent libtorrent from starting the default plugins and features.

This commit is contained in:
Andrew Resch 2008-10-01 02:19:44 +00:00
parent c668a59a82
commit 2765a97506
2 changed files with 10 additions and 2 deletions

View File

@ -165,7 +165,7 @@ class Core(
# Start the libtorrent session
log.debug("Starting libtorrent session..")
self.session = lt.session(fingerprint)
self.session = lt.session(fingerprint, flags=0)
# Load the session state if available
self.load_session_state()

View File

@ -255,9 +255,17 @@ void bind_session()
.value("delete_files", session::delete_files)
;
enum_<session::session_flags_t>("session_flags_t")
.value("add_default_plugins", session::add_default_plugins)
.value("start_default_features", session::start_default_features)
;
class_<session, boost::noncopyable>("session", session_doc, no_init)
.def(
init<fingerprint>(arg("fingerprint")=fingerprint("LT",0,1,0,0), session_init_doc)
init<fingerprint, int>((
arg("fingerprint")=fingerprint("LT",0,1,0,0)
, arg("flags")=session::start_default_features | session::add_default_plugins)
, session_init_doc)
)
.def(
"listen_on", &listen_on