From 790ef041bf7c08c6601ab16d939f4b955dd7190e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 7 Dec 2014 07:22:39 +0000 Subject: [PATCH] merged changes from RC_1_0 --- Makefile.am | 2 + bindings/python/client.py | 2 +- bindings/python/simple_client.py | 10 +- bindings/python/src/alert.cpp | 2 +- docs/building.html | 22 +- docs/building.rst | 14 +- docs/reference-Session.html | 39 +- docs/todo.html | 601 ++++++++++++---------- include/libtorrent/add_torrent_params.hpp | 7 +- src/peer_connection.cpp | 2 + 10 files changed, 382 insertions(+), 319 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3d91a346d..ab44a3c50 100644 --- a/Makefile.am +++ b/Makefile.am @@ -71,6 +71,7 @@ DOCS_PAGES = \ docs/troubleshooting.html \ docs/udp_tracker_protocol.html \ docs/utp.html \ + docs/streaming.html \ docs/building.rst \ docs/client_test.rst \ docs/contributing.rst \ @@ -89,6 +90,7 @@ DOCS_PAGES = \ docs/troubleshooting.rst \ docs/udp_tracker_protocol.rst \ docs/utp.rst \ + docs/streaming.rst \ docs/reference-Alerts.html \ docs/reference-Bencoding.html \ docs/reference-Core.html \ diff --git a/bindings/python/client.py b/bindings/python/client.py index 673b034f5..4408e8895 100755 --- a/bindings/python/client.py +++ b/bindings/python/client.py @@ -178,7 +178,7 @@ def main(): port=6881 , max_download_rate=0 , max_upload_rate=0 - , save_path='./' + , save_path='.' , allocation_mode='compact' , proxy_host='' ) diff --git a/bindings/python/simple_client.py b/bindings/python/simple_client.py index 6b56bb535..1b5edfd53 100755 --- a/bindings/python/simple_client.py +++ b/bindings/python/simple_client.py @@ -12,7 +12,7 @@ ses = lt.session() ses.listen_on(6881, 6891) info = lt.torrent_info(sys.argv[1]) -h = ses.add_torrent({'ti': info, 'save_path': './'}) +h = ses.add_torrent({'ti': info, 'save_path': '.'}) print('starting', h.name()) while (not h.is_seed()): @@ -20,9 +20,15 @@ while (not h.is_seed()): state_str = ['queued', 'checking', 'downloading metadata', \ 'downloading', 'finished', 'seeding', 'allocating', 'checking fastresume'] - print('\r%.2f%% complete (down: %.1f kb/s up: %.1f kB/s peers: %d) %s' % \ + print('\r%.2f%% complete (down: %.1f kB/s up: %.1f kB/s peers: %d) %s' % \ (s.progress * 100, s.download_rate / 1000, s.upload_rate / 1000, \ s.num_peers, state_str[s.state]), end=' ') + + alerts = ses.pop_alerts() + for a in alerts: + if a.category() & lt.alert.category_t.error_notification: + print(a) + sys.stdout.flush() time.sleep(1) diff --git a/bindings/python/src/alert.cpp b/bindings/python/src/alert.cpp index 7d8e7e05c..e6e9158b1 100644 --- a/bindings/python/src/alert.cpp +++ b/bindings/python/src/alert.cpp @@ -494,7 +494,7 @@ void bind_alert() class_, noncopyable>( "stats_alert", no_init) - .add_property("transferred", &stats_alert_transferred) + .add_property("transferred", &stats_alert_transferred) .def_readonly("interval", &stats_alert::interval) ; diff --git a/docs/building.html b/docs/building.html index 21cbded60..0e82a8147 100644 --- a/docs/building.html +++ b/docs/building.html @@ -3,7 +3,7 @@ - + libtorrent manual @@ -310,7 +310,12 @@ typically the case on x86 64 bit systems.
  • off - asserts are disabled
  • production - assertion failures are logged to asserts.log in the current working -directory, but won't abort the process.
  • +directory, but won't abort the process. +The file they are logged to can be customized +by setting the global pointer extern char +const* libtorrent_assert_log to a different +filename. +
  • system use the libc assert macro
  • @@ -445,19 +450,6 @@ awareness except on windows). -asserts - - - i2p