Commit Graph

842 Commits

Author SHA1 Message Date
arvidn 4d88c83576 add rvalue reference overloads for add_torrent_params, settings_pack and session_params. Those structures are pretty large so being able to take them by rvalue reference may be beneficial 2018-11-13 08:05:56 +01:00
arvidn a2a10e9bee expose some dht alert fields as bytes instead of strings 2018-11-10 21:31:27 +01:00
arvidn a0fa0b14bb merged RC_1_1 into master 2018-11-04 19:12:22 +01:00
arvidn 117ca9c6b1 use variatic templates in python binding 2018-11-03 18:32:40 +01:00
Arvid Norberg 939b380fda fix build against boost-1.69 2018-11-02 11:10:26 +01:00
Eugene Shalygin ba294e6594 cmake: backport changes from the master branch
This fixes generated pkg-config file and adds options to build python
bindings.
2018-10-31 00:17:36 +01:00
arvidn 9463159e67 merged RC_1_1 into master 2018-10-20 00:22:10 +02:00
Arvid Norberg ede7dbf0aa add LGTM badge to README and fix warnings 2018-10-19 16:28:33 +02:00
arvidn 4a71cc5d89 fix python binding for torrent_info::creation_date() 2018-10-12 22:49:33 +02:00
Arvid Norberg 9758d2f08f general cleanups of build files. Specifically to fix the propagation properties of _WIN32_WINNT, include missing CMake files in the tarball, and fix some risky ABI altering properties in CMake files 2018-10-12 10:06:59 +02:00
Arvid Norberg 200bb494c3 bump version 2018-10-01 09:41:37 +02:00
arvidn c437a24d78 renamed debug_notification to connect_notification 2018-09-28 17:28:34 -07:00
arvidn 109db58641 merge RC_1_1 into master 2018-09-25 21:33:29 -07:00
arvidn 6c4d1b9143 back-port the patch to split up the progress_notification alert_mask into three new categories, file-, piece- and block progress 2018-09-24 08:52:30 -07:00
arvidn 2508e2ab0f exposed default add_torrent_params flags to python bindings 2018-09-21 15:44:27 -07:00
arvidn 78a344bd8b merged RC_1_1 into master 2018-09-05 08:25:14 -07:00
Arvid Norberg 2647ca2412 add option to ignore min-interval from tracker, when force-reannouncing a tracker 2018-09-04 08:46:24 +02:00
arvidn 3d0e5fdec9 add python test for add_torrent_params and run the tests less verbose on travis and appveyor 2018-08-14 07:24:19 +02:00
arvidn 7be9547817 add a few more stats counters measuring outgoing connection attempts. simplify session_stats_header_alert by posting it on first call to post_session_stats() instead of making it gated by the alert_mask 2018-08-09 20:10:35 +02:00
arvidn 4096085bf8 merged RC_1_1 into master 2018-07-30 13:44:44 +02:00
arvidn 7980447480 added missing stats_metric python binding 2018-07-29 00:44:48 +02:00
arvidn acbe3c1880 catch exceptions out of the python notify callback and ignore them 2018-07-24 15:07:40 +02:00
Arvid Norberg 2f56fa6c3e bump version to 1.1.9 2018-07-20 13:06:12 +02:00
arvidn 3c2b076eb0 deprecated anonymous_mode_alert 2018-07-08 18:26:47 +02:00
Arvid Norberg c7e705e158 merged RC_1_1 into master 2018-07-07 13:33:15 +02:00
d-komarov 6d5a6f05ad Fix torrent files prioritization (#3133)
After setting file priority, any subsequent attempt to set different priorities will fail if there is a `file_priority` job running in in disk thread. This happens because `torrent::m_file_priority` is being updated before adding disk thread job. The problem is gone if the file priority vector owned by the torrent object, is modified in the `torrent::on_file_priority` callback, when disk job finishes.
2018-07-04 08:16:33 +02:00
arvidn d439c8729a qualify some assignment operators to disallow assignment to temporaries 2018-07-01 17:29:50 +02:00
arvidn 4576723090 bump version to 1.1.8 2018-06-25 12:25:11 +02:00
Andrew Resch 596d98cac4 Clean-up python code (#3075)
lint and enforce python code formatting
2018-06-12 11:43:13 +02:00
Andrew Resch c2ea38fdfe Add set_alert_notify to python bindings (#3066) 2018-05-29 22:30:59 +02:00
Arvid Norberg ccdfd7383e move export.hpp into aux_ folder. put assert symbols in libtorrent namespace 2018-05-14 09:09:01 +02:00
Eugene Shalygin a626f75c5e Refactor CMakeLists.txt
1. Replace custom 'shared' option with the standard BUILD_SHARED_LIBS
flag
2. Replace foreach() calls for source items with target_sources() and
generator expression $<JOIN:>.
3. Remove build types definition: makes no sense for
single-configuration generators, and is populated automatically for
multi-configuration ones.
4. Add feature summary
5. Enahnce compiler flags management for static runtime by utilizing functions
from the ucm project
6. Copy almost all options from the Jamfile.
7. If compiler supports C++14, use it.
8. Raise minimum required CMake version to 3.11 and drop bundled FindIconv.cmake
2018-05-14 09:08:19 +02:00
arvidn fe612ca167 replace the TORRENT_CFG ABI check with inline namespaces around the symbol that can change ABI based on build configuration options 2018-05-13 19:25:17 +02:00
Alden Torres cb8b32f353 revert to use Boost variables in CMakeLists.txt 2018-05-01 10:50:21 +02:00
Eugene Shalygin 3c6e0b2578 Generate proper pkg-config file in cmake build 2018-04-29 19:48:26 +02:00
Eugene Shalygin 049e918295 build python bindings with cmake 2018-04-29 19:48:26 +02:00
Eugene Shalygin 55e2b23255 Add workaround for MSVC and snprintf define 2018-04-29 19:48:26 +02:00
Arvid Norberg 07ff024e30 fix conversions of resume_data field of save_resume_data_alert. make write_resume_data_buf return a byte-array. use write_resume_data_buf() in client.py instead of, the deprecated, resume_data 2018-04-29 16:33:09 +02:00
Arvid Norberg fc56ec194a merge RC_1_1 into master 2018-04-29 15:07:26 +02:00
Arvid Norberg 747fcb633a fix typo in client.py. introduce parse_magnet_uri_dict to python binding (returning a dict) in preparation for next major version that will release an add_torrent_params object 2018-04-28 19:05:23 +02:00
Eugene Shalygin 927647acc5 Add options to specify network interfaces to client.py 2018-04-28 15:55:28 +02:00
arvidn 8621477239 merged RC_1_1 into master 2018-04-28 14:36:24 +02:00
Arvid Norberg d8c022070f merged RC_1_1 into master 2018-04-21 17:17:55 -04:00
Arvid Norberg e1f99fb309 fix boost-python linking with latest version of brew 2018-04-21 18:35:05 +02:00
arvidn 52e1a7b6c9 merged RC_1_1 into master 2018-04-15 11:00:57 +02:00
Steven Siloti b3faba329d create dummy alias for boost_python3 when python3 is unavailable
Versions of boost as recent as 1.63 do not create a stub alias for python3
which causes build failures if no version of python3 is configured.
Duplicate that behavior so that building works even on older versions of
boost.
2018-04-13 08:27:22 +02:00
arvidn 105934e578 bump version 2018-04-08 23:08:39 +02:00
Arvid Norberg 6efff919cd deprecated alert::progress_notification alert category, split into finer grained categories 2018-04-05 16:27:28 +02:00
Steven Siloti 59d1c1f067 expose tracker_alert::local_endpoint in python bindings 2018-04-05 16:01:06 +02:00
Arvid Norberg 16f1deb3ec merged RC_1_1 into master 2018-04-04 15:28:33 +02:00
Steven Siloti e7e5805c56 support building python bindings for python 3 and 64 bit 2018-03-27 11:04:56 +02:00
arvidn 9df4d4b7f8 replace typedef with using. replace NULL with nullptr. cleanup page_aligned_allocator 2018-03-23 11:19:46 +01:00
arvidn 8a85e1c01a merged RC_1_1 into master 2018-03-21 12:17:11 +01:00
arvidn 137baa6c04 expose post_dht_stats() to python binding 2018-03-17 16:19:20 +01:00
arvidn 4b144ba451 merged RC_1_1 into master 2018-03-16 13:16:45 +01:00
Arvid Norberg 3721d8e710 expose missing file_storage::file_name() in the python bindings 2018-03-15 14:54:21 +01:00
arvidn 5c1b65e9b8 merged RC_1_1 into master 2018-03-12 02:32:12 +01:00
arvidn b841860643 improve python binding for torrent_handle::connect_peer 2018-03-09 23:44:15 +01:00
arvidn 4fef787212 merged RC_1_1 into master 2018-01-24 00:37:05 +01:00
arvidn abbbcf52c1 add missing session_stats_header_alert in python binding 2018-01-23 19:23:24 +01:00
arvidn a8cf790833 disable some session features to not run our of open files in python test 2018-01-23 19:23:24 +01:00
arvidn 1f2a2294cc run fewer osx jobs on travis 2018-01-23 19:23:24 +01:00
arvidn efd096d879 use unique peer_ids per connection 2018-01-23 16:40:16 +01:00
arvidn 7ff9f79af3 run fewer osx jobs on travis 2018-01-23 16:33:13 +01:00
arvidn c5569902a8 fix python bindings 2018-01-21 19:53:31 +01:00
arvidn 91104e27c9 fix python binding for queue_position_t 2018-01-13 17:33:01 -05:00
arvidn c8bf782bd0 bump version number to 1.1.6 2017-12-29 15:53:51 +01:00
arvidn a9753d3bdc merge RC_1_1 into master 2017-12-27 22:16:14 +01:00
arvidn 69ff30f50f deprecate save_encryption_settings (they are part of the normal settings) 2017-12-27 13:39:36 +01:00
arvidn 7ea5946305 remove some last lexical_cast residual 2017-12-27 12:44:36 +01:00
arvidn a54f76d5df deprecate status_code from tracker_error_alert (it's already part of the error_code), simplify code a bit 2017-12-19 00:55:51 +01:00
arvidn bb945f5cf4 introduce a proper type for pex flags to improve type-safety 2017-12-17 23:17:12 +01:00
arvidn 5ce798197c merged RC_1_1 into master 2017-12-02 11:39:23 +01:00
arvidn cfd50ae736 fix simple_client.py example, and reference it from the documentation 2017-11-23 22:01:54 +01:00
arvidn 7730eea401 restore backwards compatibility with the API before download_priority_t was introduced 2017-11-06 01:24:24 +01:00
arvidn 6785046c2f introduce a download_priority_t type, for uniform an type-safe piece- and file priorities 2017-11-02 08:20:21 +01:00
arvidn f57b90b500 introduce type for torrent queue_position 2017-11-01 10:52:45 +01:00
Alden Torres f040d6d860 added reopen_network_sockets method to allow manual reopen of listen/outgoing sockets (#2476) 2017-10-28 12:15:35 +02:00
arvidn ee9e0abb1a fix python binding for torrent_status::error_file 2017-10-20 11:43:11 +02:00
arvidn 244d18dcf8 merged RC_1_1 into master 2017-10-17 09:38:51 +02:00
Andrew Resch 9f6631bfbe Expose torrent_alert::torrent_name in python bindings (#2449) 2017-10-15 23:53:44 +02:00
arvidn a6c85496b5 make parse_magnet_uri return the add_torrent_params instead of of taking an in-out parameter 2017-10-15 04:29:53 +02:00
Arvid Norberg 60b74d2616 merged RC_1_1 into master 2017-10-10 14:25:12 +02:00
Arvid Norberg 830ef0bedd prevent dependency on openssl from leaking outside of libtorrent (libssl and libcrypto should not be a usage requirement). This cleans up most tests to build without having to also link against openssl 2017-10-09 17:15:35 +02:00
Alden Torres e47f73ee3b cleanup of field torrent_need_cert_alert::error (#2414)
deprecate field torrent_need_cert_alert::error
2017-10-06 10:54:33 +02:00
arvidn 15d11d29e7 fix master python binding 2017-10-04 15:30:37 +02:00
arvidn 69dc73914a merged RC_1_1 into master 2017-10-04 11:43:01 +02:00
arvidn 9cad0d8cf2 expose peer class API in python binding 2017-09-24 23:25:20 -07:00
Steven Siloti 0232dc35cd deprecate lock_files (#2344)
File locking interacts poorly with the path to replace a read only file handle
with a read/write one. For performance reasons the old handle is not closed
until the new one is put in place. With file locking this obviously cannot
work because the first handle is holding a lock on the file. As a result,
file_pool::open_file fails in this case. Even if we dropped the reference to
the read only file handle before attempting to re-open it, the open could still
fail if another thread is holding a reference to the read only handle.

There doesn't seem to be a good way around this. The simple solution would be
to always open files in read/write mode, but that has obvious safety downsides.
Any other solution would significantly complicate the file pool code.
Deprecating file locking seems to be the least bad option.
2017-09-17 10:43:27 +02:00
arvidn 686e3ed27b merged RC_1_1 2017-09-12 00:22:55 +02:00
arvidn ccbd6cbcfe remove rss_reader.py, since rss has been reprecated. fix python binding for torrent_handle, to be hashable. update client_test.py to not use deprecated APIs and follow best (libtorrent) practice 2017-09-11 22:28:57 +02:00
Steven Siloti fdd6a3862d python: return file index by value
Fixes TypeError: No Python class registered for C++ class
2017-09-11 07:23:05 +02:00
Steven Siloti 1cd40ee7e3 python: return torrent handles in alerts by value
This is needed to avoid a dangling reference if the client stores a
reference to the handle.
2017-09-10 08:55:02 +02:00
arvidn bb51dcdbb9 move dht_settings into its own header cpp file-pair and dht_settings into the dht namespace 2017-09-04 22:38:16 +02:00
arvidn 061732ddec bump version 2017-09-04 15:35:45 +02:00
arvidn 53ff169db1 use string_view in find_metric_idx 2017-09-04 07:50:13 +02:00
arvidn 9c7f87ed5d fix python binding of port_mapping_t 2017-09-04 07:49:36 +02:00
Arvid Norberg f734ad067b straighten out some type-safety in port mapping enums (#2285) 2017-08-30 20:47:49 +02:00
arvidn 41bfd41cea fix python binding with new boost version 2017-08-25 09:43:01 +02:00
Arvid Norberg d250ba5a17 wrap destination string in i2p_peer in string_ptr handler (#2268) 2017-08-25 09:42:46 +02:00