Commit Graph

73 Commits

Author SHA1 Message Date
Yat Ho
df221daab5 refactor: torrent complete verify cleanup (#7802)
* refactor: rename torrent-complete-verify-enabled to snake_case

* docs: add docs for torrent_complete_verify_enabled

* code review: correct docs data type
2025-11-11 09:29:09 -06:00
Charles Kerr
995dfe567e refactor: remove unused quarks from libtransmission (#7799)
* chore: remove unused TR_KEY_comment_utf_8

chore: remove unused TR_KEY_created_by_utf_8

chore: remove unused TR_KEY_name_utf_8

chore: remove unused TR_KEY_path_utf_8

These keys have been unused since fe288b45 (#2542)

* chore: remove unused TR_KEY_ut_comment

chore: remove unused TR_KEY_ut_recommend

Never used. We can add these back when we support them

* remove unused TR_KEY_queue_move_bottom

remove unused TR_KEY_queue_move_down

remove unused TR_KEY_queue_move_top

remove unused TR_KEY_queue_move_up

Added in c1559f3c, but never used.

* chore: remove unused TR_KEY_play_download_complete_sound

Never used and is a duplicate of TR_KEY_torrent_complete_sound_enabled.
Maybe it was a draft name that accidentally snuck into production?

* chore: remove unused TR_KEY_downloaders

chore: remove unused TR_KEY_min_announce_interval

Unused since 7f60738c (#2529)

* chore: remove unused TR_KEY_recent_download_dir_1

chore: remove unused TR_KEY_recent_download_dir_2

chore: remove unused TR_KEY_recent_download_dir_3

chore: remove unused TR_KEY_recent_download_dir_4

chore: remove unused TR_KEY_recent_relocate_dir_1

chore: remove unused TR_KEY_recent_relocate_dir_2

chore: remove unused TR_KEY_recent_relocate_dir_3

chore: remove unused TR_KEY_recent_relocate_dir_4

Looks like these were intended for the GTK client's recent dirs
feature (see gtr_save_recent_dir() and gtr_get_recent_dirs()),
but that code does it better without quarks.
2025-11-10 23:58:30 -06:00
Cœur
78238ec3de fix corruption: torrentVerify on completion (#4178)
* torrentVerify on completion

* Make torrent verify on completion configurable via settings

* code review: replacing tr_verify_complete_mode with bool

* code review: sorting torrent_complete_verify_enabled with bool

* Update Application.cc

* code review: avoiding `session->onTorrentCompletenessChanged` before verification completion
2025-11-10 14:16:15 -06:00
cdowen
a2d2097b9f feat: add peer traffic statistics to rpc call (#7172)
* Add peer traffic data in torrent-get rpc interface

* style issue

* update peer rpc spec

* Add bytes_sent_to_peer and bytes_sent_to_client in peer_info and peer-mgr

* make counting variables non-persistent and limited to last several seconds

* change variable to snake-case

* use size_t instead of uint16_t for bytes

* fix use camel_case

* move to did_write
2025-11-10 09:41:03 -06:00
cdowen
5db90f9ed9 feat:add raw PeerID to RPC interface (#7514)
* add raw PeerID to rpc interface

* use snake_case

* add peer_id to doc

* pass peer_id only and use peer_id_t and base64 encoding when passing peer_id to stat

* clang format

* fix dangling pointer

* remove std::optional

* clean up tr_peerMsgs constructor

* move b64encode to rpc

* just use constructor

* Update libtransmission/peer-msgs.cc

Co-authored-by: Yat Ho <lagoho7@gmail.com>

---------

Co-authored-by: Yat Ho <lagoho7@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-11-08 07:47:40 -06:00
Alexander Terentyev
2c5b7f94d1 feat: proxy support for web-connections (#5038)
* feature: proxy support for web-connections

* forgotten changes

* fix code-styles

* –Documentation for new setting "proxy-url"

* Create property proxyUrl for class tr_web. Lazy creation of tr_web object in tr_session after loaded settings from file

* Update docs/Editing-Configuration-Files.md

Simplify the documentation text

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>

* Fix merge error

* Fix merge error.

* Simplify tr_web's lifecycle. Fix error. Rename quark to sneak_case-style

* Fix parameter value test

---------

Co-authored-by: ThinkChaos <ThinkChaos@users.noreply.github.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-10 17:32:18 -05:00
Yat Ho
7b83c7d625 refactor: rename unreleased quarks to snake_case (#7483)
* refactor: rename `sequentialDownload` to `sequential_download`

* refactor: rename `beginPiece` to `begin_piece`

* refactor: rename `endPiece` to `end_piece`

* refactor: rename `ipProtocol` to `ip_protocol`

* refactor: rename `preferred-transport` to `preferred_transport`
2025-03-10 17:30:19 -05:00
Yat Ho
47eb4ee2bc refactor: dedicated class for torrent queue (#7332)
* Revert "feat: save queue order between sessions (#6753)"

This reverts commit 4db50dae10.

* refactor: new torrent queue class

* refactor: replace queue code with new class

* test: new tests for new class

* feat: store and load queue order across sessions

* build: xcode

* refactor: use set_difference instead of unordered_set

* code review: use `tr_torrent_id_t` as key

* fix: don't overflow when moving up/down

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2025-03-09 19:08:50 -05:00
Yat Ho
1054ba4ab6 refactor: store peers as benc in resume file (#6892)
* refactor: add `tr_pex::to/from_variant()`

* refactor: store peers as benc in resume

* fix: discard invalid pex in `tr_pex::from_variant()`

* fix: limit number of peers loaded from resume
2025-03-08 12:19:18 -06:00
Yat Ho
4db50dae10 feat: save queue order between sessions (#6753)
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-10-13 11:36:38 -05:00
Charles Kerr
6132706565 chore: iwyu (#6864)
* chore: do not include <set> unless we use it

* chore: do not include <map> unless we use it

* chore: do not include <string> unless we use it

* chore: do not include <list> unless we use it

* chore: do not include <memory> unless we use it

* chore: do not include <optional> unless we use it

* chore: do not include <functional> unless we use it
2024-05-27 17:36:02 -05:00
Cœur
460ce7c302 Add start_paused to settings file and daemon (#6728)
* Add daemon-startPaused to settings file

* code review: naming

* "Predefined quarks must be sorted by their string value"

* code review: replacing paused_ with tr_variantDictAddBool/tr_variantDictFindBool

* code review: doc

* Update docs/Editing-Configuration-Files.md

Co-authored-by: Yat Ho <lagoho7@gmail.com>

---------

Co-authored-by: Eugen Beck <beck@cs.rwth-aachen.de>
Co-authored-by: Yat Ho <lagoho7@gmail.com>
2024-03-30 16:39:44 -05:00
Yat Ho
2548dd478f feat: periodically refresh dht node id (#6695) 2024-03-17 18:24:36 -05:00
Mrnikifabio
f06cb37c06 feat: added sleep-per-seconds-during-verify to settings.json (#6572)
* feat: added `sleep-per-seconds-during-verify` to settings.json

* Ensuring `sleep_per_seconds_during_verify > 0` in `verify_torrent` for better performance

* `#include` list reordered alphabetically

* fix: `[readability-inconsistent-declaration-parameter-name]` warning
2024-02-12 09:30:40 -06:00
Yat Ho
8b8e9f5c6d fixup! fix: include daemon-specific options in app defaults (#6505)
* fixup! fix: include daemon-specific options in app defaults (#6499)

* fix: windows build failure

* Revert "fixup! fix: include daemon-specific options in app defaults (#6499)"

This reverts commit 92c2106cc607df36aca4ba28e8c20bd96fa87688.

* refactor: define daemon-specific quarks in libtransmission
2024-01-11 13:20:22 +00:00
Charles Kerr
3cd66899fe refactor: remove prefetch (#6332) 2023-12-04 11:45:37 -06:00
Charles Kerr
64d9d57363 chore: fix minor clang-tidy warnings (#6275) 2023-11-21 09:02:03 -06:00
Julien
8ac323d5d6 chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05: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
Yat Ho
85a120faea feat: add preferred-transport to settings.json (#5939) 2023-09-15 20:23:34 -05:00
tearfur
5ec4ca550e chore: iwyu (#5746) 2023-07-08 10:24:03 -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
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
5cc3bf8a97 fix: generate peer-id on launch (#5233) 2023-03-15 20:53:48 -05:00
Julien
4b8cfa2e57 chore: update copyrights to 2023 (#4834) 2023-02-11 14:49:42 -06:00
anarcat
331e1699bc add remote HTTPS support to Qt GUI (#4622) 2023-01-26 00:24:04 -06:00
Charles Kerr
33a7d131b4 feat: add setting to choose between lazy-verify or full verify (#4611) 2023-01-18 02:09:29 -06:00
Charles Kerr
611b181a99 feat: add yourip to extension protocol handshake (#4504)
* feat: add yourip to the extension protocol handshake
2023-01-01 12:20:46 -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
1782dc6d7a refactor: use readability-identifier-naming in clang-tidy (#3784) 2022-09-07 11:04:28 -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
Charles Kerr
ab09718342 fixup! perf: sonarcloud warnings about temp objects (#3686) (#3699) 2022-08-23 15:46:08 -05:00
bexnoss
258faf3623 gtk: Remember 4 recent relocate dirs (#3691)
* fix(gtk): prevent duplicate shortcut folders

This prevents duplicates if the recent destination is also a system
shortcut folder.

* refactor(gtk): create gtr_get_recent_dirs helper

* feat(gtk): remember 4 recent relocate dirs
2022-08-21 21:26:13 -05:00
Charles Kerr
785119f2c2 perf: sonarcloud warnings about temp objects (#3686)
* perf: sonarcloud warnings about unnecessary temporary objects

* refactor: rename tr_sha1_digest_t::final() as finish()
2022-08-20 15:57:32 -05:00
Charles Kerr
bfec98c323 refactor: avoid tr_new() in transmission-remote (#3665) 2022-08-17 20:25:42 -05:00
Charles Kerr
7fe2cf68b9 refactor: avoid tr_new(), tr_free() in tr_variant (#3663)
* refactor: remove unused tr_renew()

* refactor: remove unused tr_realloc()

* refactor: avoid tr_strvDup() in tr-quark
2022-08-17 14:44:18 -05:00
Viacheslav Chimishuk
de7986e01d Add announce-ip and announce-ip-enabled parameters. (#3461) 2022-07-20 14:04:52 -05:00
Charles Kerr
61c1a0f1e8 feat: add rpc torrentGet.availability (#3252) 2022-06-11 12:06:07 -05:00
Matan Ziv-Av
c07bac4e19 Limit bandwidth used by a group of torrents (#2761)
* Add support for bandwidth groups. i.e. Bandwidth limit for a (user specified) group of torrents,
2022-03-18 08:11:59 -05:00
LaserEyess
706735ca88 Support binding the RPC to a Unix socket on *nix platforms (#2574)
* Support binding the RPC to a Unix socket on *nix

This commit adds unix socket support for a RPC. Some refactoring was
required in order to split out the RPC server's address struct from the
normal network address struct used for peers. It would cause
unacceptable overhead to add the unix socket length to the union.

Co-authored-by: Malte Voos <malte@malvo.org>

* add RPC socket mode to control unix socket perms

Unix socket permissions are important to control for security reasons,
and libevent defaults to 0755, which may not be what users want.

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
Co-authored-by: Malte Voos <malte@malvo.org>
2022-02-23 15:09:54 -06:00
Stefan Talpalaru
7b377511a9 feat: default public trackers 2022-02-21 08:34:57 -06:00
Charles Kerr
02b6cc76d1 feat: add tr_torrentSetTrackerList(), tr_torrentGetTrackerList() (#2642)
Add a getter/setter for torrent announce URLs as text that can be copied
and pasted: one URL per line, with a blank line between tiers.

C API: tr_torrentGetTrackerList() and tr_torrentSetTrackerList()
RPC APi: `trackerList` in `torrent-get` and `torrent-set`.

This deprecates `trackerAdd`, `trackerRemove`, and `trackerEdit`
from the RPC API.
2022-02-18 11:52:01 -06:00
Charles Kerr
9f9b6cdaa2 feat: run script when done seeding (#2621)
* feat: add seeding-done script to core and rpc

* feat: add seeding-done script to gtk client

* feat: add seeding-done script to qt client

* feat: add seeding-done script to transmission-remote

* refactor: make Qt and GTK client text match

* test: update tests

Co-authored-by: Timothy Nibeaudeau <timothy.nibeaudeau@gmail.com>
2022-02-13 22:07:12 -06:00
Charles Kerr
83db648b3c Add support for torrent-get calls with the key percentComplete (#2615)
Co-authored-by: Michael Hadam <michael@hadam.us>
2022-02-13 01:27:47 -06:00
Charles Kerr
e14c7f38e5 feat: use libpsl (#2575)
Use libpsl to calculate public and private parts of URL hosts.
2022-02-12 11:30:27 -06:00
Charles Kerr
ebb2ab6aee chore: update license spdx abbreviations (#2582)
Use SPDX license list 3.0 terminology: replace deprecated identifiers
GPL-2.0" and "GPL-3.0" with "GPL-3.0-only" and "GPL-3.0-only".
2022-02-07 10:25:02 -06:00
Charles Kerr
878405f862 Revert "fix: sonarcloud (#2558)" (#2562)
This reverts commit 8b9483f7fb.
2022-02-01 11:30:51 -06:00
Charles Kerr
8b9483f7fb fix: sonarcloud (#2558)
* fix: add const modifier for functions

* fix: many sonarcloud use-init-statement warnings
2022-01-31 22:46:27 -06:00