From 0e73700f1511876385411a712d6afdbfdbcb57fe Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Wed, 26 Sep 2007 01:14:55 +0000 Subject: [PATCH] Fix add_torrent() deprecation and fix tracker_reply_alert to have the number of peers. --- libtorrent/bindings/python/src/alert.cpp | 4 +++- libtorrent/bindings/python/src/session.cpp | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libtorrent/bindings/python/src/alert.cpp b/libtorrent/bindings/python/src/alert.cpp index c212ed04d..722cee461 100755 --- a/libtorrent/bindings/python/src/alert.cpp +++ b/libtorrent/bindings/python/src/alert.cpp @@ -86,7 +86,9 @@ void bind_alert() class_, noncopyable>( "tracker_reply_alert", tracker_reply_alert_doc, no_init - ); + ) + .def_readonly("num_peers", &tracker_reply_alert::num_peers) + ; class_, noncopyable>( "tracker_announce_alert", tracker_announce_alert_doc, no_init diff --git a/libtorrent/bindings/python/src/session.cpp b/libtorrent/bindings/python/src/session.cpp index 3717ebadd..6d4855c10 100755 --- a/libtorrent/bindings/python/src/session.cpp +++ b/libtorrent/bindings/python/src/session.cpp @@ -174,8 +174,8 @@ void bind_session() .def( "add_torrent", &add_torrent , ( - arg("torrent_info"), "save_path", arg("resume_data") = entry() - , arg("compact_mode") = true, arg("paused") = false + arg("resume_data") = entry(), arg("compact_mode") = true + , arg("paused") = false ) , session_add_torrent_doc )