252 Commits

Author SHA1 Message Date
Charles Kerr
e54b17d92e refactor: blocklists (#6189) 2023-10-31 19:20:01 -04:00
Charles Kerr
f0e9f90782 refactor: move tr_session::getAllTorrents to tr_torrents (#6179) 2023-10-30 16:38:02 -04:00
Dzmitry Neviadomski
c697d95ad3 fix: crash after nullptr dereference in rpcimpl (#6177) 2023-10-30 13:30:10 -04:00
Charles Kerr
901de536a3 fix: in RPC, default to sort torrents by id (#5604)
When getting all torrents in a batch over RPC, the results are sorted by
info-dict hash. Prior to 4.0.0, they were sorted by ID. This change broke
some peoples' workflows.

I'm OK with breaking workflows if it's necessary to improve the program,
but this was an unintentional side-effect and I don't see any inherent
benefit to either sort order. So this PR restores the 3.00 sort order.

https://xkcd.com/1172/
2023-10-25 13:42:14 -04:00
Charles Kerr
bbc3ce039f refactor: remove quark support from tr_variant (#6159) 2023-10-24 14:49:23 -04:00
Yat Ho
6d958bd5fc feat: do separate IPv4 and IPv6 port checks in WebUI (#5953)
* feat: add `ipProtocol` argument to `port-test` rpc method

* chore: update rpc-spec.md

* feat: split port check UI to IPv4 and IPv6 in webUI

* fix: default `open` to false if cannot get response

* chore: minor docs wording tweak

* chore: make clang-tidy happy

* chore: RPC doc tweaks

* fix: bad merge

* chore: review feedback

Co-authored-by: Charles Kerr <charles@charleskerr.com>

* chore: match quark enum with parameter case

* refactor: use descriptive strings for `ipProtocol`

* chore: update docs

* fixup! refactor: use descriptive strings for `ipProtocol`

* fixup! chore: update docs

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-10-24 09:27:28 -04:00
Charles Kerr
735639c5c7 refactor: make tr_torrent::labels_ private (#6153) 2023-10-23 18:11:28 -04:00
Charles Kerr
682e4f2c2b refactor: make tr_torrent::any_date_ private (#6148) 2023-10-21 23:23:08 -04:00
Charles Kerr
8f7330523c chore: remove unused progress arg from tr_torrentSetLocation() (#6147) 2023-10-21 22:33:41 -04:00
Charles Kerr
4bdb3066d8 refactor: decouple tr_verify_worker from tr_torrent (#6123) 2023-10-19 08:39:34 -05:00
Yat Ho
0c52b710ad feat: add option to force verify torrent in WebUI (#5981) 2023-10-06 22:52:59 -05:00
Yat Ho
2c97567370 chore: minor housekeeping for bandwidth code (#6080) 2023-10-06 18:30:04 -05:00
Charles Kerr
68f3c89e3c refactor: make tr_torrent idle fields private (#6070) 2023-10-03 20:18:55 -05:00
Charles Kerr
32a62d85ea refactor: more tr_variant API (#6057) 2023-10-02 16:18:35 -05:00
Charles Kerr
114885d67b fixup! refactor: tr_variant API update (#5998) (#6036)
fix use of invalidated pointer in rpcipml
2023-09-25 13:24:46 -05:00
Charles Kerr
6ead147620 refactor: use new tr_variant API in tr_session (#6006) 2023-09-16 08:23:35 -05:00
Charles Kerr
5837603b6f refactor: make tr_variant follow RAII (#5923) 2023-08-20 23:15:23 -05:00
tearfur
ca4cb1a675 fix/cleanups to tr_peerMsgsImpl (#5783)
* fix: correct condition to advertise pex support in ltep handshake

1. Advertise pex support regardless of whether the peer had advertised pex support. No reason to give up an opportunity to advertise pex support just because our direct peer does not support it.
2. Check if pex is enabled in global settings as well.
2023-07-14 10:51:52 -05:00
tearfur
5ec4ca550e chore: iwyu (#5746) 2023-07-08 10:24:03 -05:00
Charles Kerr
c364abcb6f chore: misc-include-cleaner (partial) (#5738) 2023-07-06 10:00:07 -05:00
Charles Kerr
8183d7fddf refactor: utils naming (#5696)
* chore: rename tr_strvContains to tr_strv_contains

* chore: rename tr_strvStartsWith to tr_strv_starts_with

* chore: rename tr_strvEndsWith to tr_strv_ends_with

* chore: rename tr_strvSep to tr_strv_sep

* chore: rename tr_strvStrip to tr_strv_strip

* chore: rename tr_strvToBuf to tr_strv_to_buf

* refactor: rename tr_saveFile() to tr_file_save()

rename tr_loadFile() to tr_file_read()

rename tr_moveFile() to tr_file_move()

* refactor: rename tr_parseNum() to tr_num_parse()

refactor: rename tr_parseNumRange() to tr_num_parse_range()

* chore: group related functions together in header
2023-06-30 09:49:58 -05:00
tearfur
b79de0b431 perf: convert comparator functors to static constexpr (#5687) 2023-06-29 13:13:25 -05:00
Charles Kerr
22bb9e5757 refactor: rename tr_dirSpace() to tr_sys_path_capacity() (#5689) 2023-06-29 10:23:00 -05:00
Daniel Kamil Kozar
c1c27f3da0 Expose files' begin and end pieces via RPC (#5578)
* Expose files' begin and end pieces via RPC

This adds two arguments, `beginPiece` and `endPiece`, for each of the entries
in the `files` array of the RPC's `torrent-`get` method.

The point is to allow RPC clients to display a file's completion progress as
piece-based in addition to byte-based.
2023-06-05 13:15:32 -05:00
Charles Kerr
c61d8b7cf7 refactor: rename tr_tracker_view.host to .host_and_port for clarity (#5508) 2023-05-08 20:28:10 -05:00
Charles Kerr
9d2507c7e3 refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Charles Kerr
d72cb67cfb chore: include directory name in libtransmission #includes (#5308) 2023-04-14 14:33:23 -05:00
Pierre Dubouilh
ebfba686b0 feat: sequential download (#4795) 2023-04-14 11:47:54 -05:00
Charles Kerr
e33d9536ef fix: return success on RPC add-torrent duplicate (#5370)
Keep Transmission 3's behavior to avoid unannounced API change
2023-04-12 13:37:04 -05:00
Charles Kerr
900281eb1c fix: check tr_ctorSetFoo() return values before adding torrent via RPC (#5202) 2023-03-11 19:44:54 -06:00
Charles Kerr
b354337720 ci: check for clang tidy errors in libtransmission (#5188) 2023-03-10 00:23:22 -06:00
reardonia
9c436d87dd fix: torrentGet.wanted RPC breaking change in [4.0.0..4.0.1] (#5170) 2023-03-07 19:44:25 -06:00
Julien
4b8cfa2e57 chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
Charles Kerr
0c582c6d7e fix: race condition in RPC (#4725) 2023-02-06 10:42:37 -06:00
Charles Kerr
0f4077a445 fix: announcer not updated after torrent announce list edited (#4635) 2023-01-22 11:53:08 -06:00
Charles Kerr
9678b26984 refactor: misc-use-anonymous-namespace pt. 3 (#4539) 2023-01-07 08:27:54 -06:00
Charles Kerr
bd61bd2558 refactor: use anonymous namespace in rpc-server.cc (#4530)
refactor: use anonymous namespace in rpcimpl.cc
2023-01-03 22:24:12 -06:00
Charles Kerr
59335eac03 fix: sonarcloud cpp:S6004 (#4270)
reduce scope of variables by using if-based initializer
2022-11-28 21:03:28 -06:00
Charles Kerr
6bec2f22c8 fix: 4.0.0-beta.1 wrong RPC response for group-get (#4171) 2022-11-14 16:31:41 -06:00
Charles Kerr
09bb1a60f0 refactor: add more nodiscard, constexpr, and noexcept (#4089) 2022-11-03 18:08:02 -05:00
Charles Kerr
611d36ac84 refactor: decouple session settings from the session class (#4053) 2022-11-01 19:32:26 -05:00
Charles Kerr
210bb03f2f fix: recent signed-unsigned comparison warnings (#4034) 2022-10-26 11:20:10 -05:00
A Cœur
12e564096b fix: "Implicit conversion loses integer precision" warnings (#3960) 2022-10-25 11:14:42 -05:00
Charles Kerr
2262efdb7f fix: ignore unrecognized torrent-get fields (#4018)
Fixes #2916.

Not actually a Transmission bug, but restores undefined behavior to be
consistent with 3.00's undefined behavior in the RPC spec.
2022-10-24 15:02:48 -05:00
Mike Gelfand
70f623f32b Add user data parameter for torrent removal callback (#4009) 2022-10-23 11:51:35 -05:00
Charles Kerr
4a359fd481 refactor: session private fields (#3961)
* refactor: make tr_session.private_peer_port a private field

chore: make tr_session.public_peer_port a private field

* refactor: make tr_session.web_ a private field

* refactor: make tr_session.lpd_ a private field

* refactor: make tr_session.bind_ipv4_ private

refactor: make tr_session.bind_ipv6_ private

* refactor: make tr_session.bandwidth_groups_ private; add const accessor

* refactor: make tr_session.port_forwarding_ private

* refactor: make tr_session.peerMgr private pt 1: add tr_session::addIncoming()

* refactor: make tr_session.peerMgr private pt 1: add tr_session::addTorrent()

* refactor: make tr_session.peer_mgr_ private

* refactor: make tr_session.setPeerPort() private
2022-10-13 21:25:02 -05:00
Charles Kerr
1782dc6d7a refactor: use readability-identifier-naming in clang-tidy (#3784) 2022-09-07 11:04:28 -05:00
Charles Kerr
d130f7d593 refactor: prefer std::unique_ptr over std::shared_ptr (#3741) 2022-08-30 19:30:47 -05:00
Charles Kerr
072bb0322c refactor: remove tr_quark_get_string() (#3728) 2022-08-28 16:17:07 -05:00
Greg Hazel
fa8b6a5e0a option to disable TCP (#3447) 2022-08-25 21:27:11 -05:00