Charles Kerr
849cd0ecea
refactor: remove write cache ( #8669 )
...
* refactor: mark cache_size_mib as deprecated in RPC
* refactor: make RPC session_set cache_size_mib a no-op
* refactor: tr_ioRead(), tr_ioWrite() now take a std::span
* refactor: add BufferReader::to_buf(std::span<uint8_t>)
* refactor: migrate some methods to to_buf(std::span<uint8_t>)
* refactor: remove the write memory cache
* chore: simplify recalculate_hash()
* refactor: simplify span use in tr_peerMsgsImpl::read_piece_data()
2026-03-11 07:16:39 -05:00
Yat Ho
a3545eb9c2
feat: bound-checked tr_variant::value_if() for smaller integer types ( #8660 )
...
* feat: bound-checked `tr_variant::value_if()` for smaller integer types
* feat(rpc): ignore values outside the `tr_torrent_id_t` range
2026-03-09 19:35:08 -05:00
Charles Kerr
974b16e71c
refactor: remove tr_torrentsQueueMoveTop() from public API ( #8666 )
...
* refactor: remove tr_torrentsQueueMoveTop() from public API
refactor: remove tr_torrentsQueueMoveUp() from public API
refactor: remove tr_torrentsQueueMoveDown() from public API
refactor: remove tr_torrentsQueueMoveBottom() from public API
* refactor: remove unused tr_torrentGetQueuePosition()
2026-03-09 17:00:42 -05:00
Yat Ho
eac99ff1a0
fix: readability-container-contains ( #8656 )
...
* fix(core): `readability-container-contains`
* fix(test): `readability-container-contains`
* build(gtk): enable `readability-container-contains`
* fix(qt): `readability-container-contains`
2026-03-05 10:00:29 -06:00
Charles Kerr
5e305a2d26
refactor: simplify session callbacks ( #8646 )
...
* refactor: add a Torrent.id property
* feat: add Controller.torrentForId
* refactor: make tr_session_idle_limit_hit_func a std::function
* refactor: make tr_session_metadata_func a std::function
* refactor: make tr_session_ratio_limit_hit_func a std::function
* refactor: make tr_torrent_completeness_func a std::function
* refactor: make tr_altSpeedFunc a std::function
* refactor: make tr_sessionSetQueueStartCallback callback a std::function
* refactor: make tr_rpc_callback_status callback a std::function
* refactor: remove user_data arg from tr_torrent_rename_done_func
* refactor: harden `tr_torrentFindFromId()` by making it safe to pass in a nullptr session
2026-03-03 16:02:54 -06:00
Ivan Kara
eac1f24f0b
feat(web): add webseeds list ( #8421 )
...
* Add webseeds list to web ui
* Better webseed url column title
* Apply suggestions
* Follow existing table row creation style
* Fix webseed table speed-down column
* Fix empty class error
* Add webseeds_ex to rpc changelogs
* Apply suggestions from CI
* Fix webseeds_ex rpc spec
2026-02-13 09:16:35 -06:00
Yat Ho
bbfc9e057c
chore: bump rpc versions ( #8452 )
2026-02-12 10:40:35 -06:00
Charles Kerr
cbaefab599
refactor: add libtransmission/types.h ( #8449 )
...
refactor: add libtransission/constants.h
2026-02-11 16:52:29 -06:00
Charles Kerr
21874392a9
refactor: string-utils, file-utils, env ( #8417 )
...
* refactor: add libtransmission/string-utils
* refactor: add libtransmission/file-utils
* refactor: add libtransmission/env
* build: update Xcode
2026-02-11 11:21:45 -06:00
Yat Ho
a583f8e789
fix(rpc): return integers for speed limits ( #8406 )
2026-02-09 21:01:54 -06:00
Yat Ho
3a8a4d9b86
refactor: wrap std::filesystem::space calls ( #8284 )
...
Co-authored-by: Charles Kerr <charles@charleskerr.com >
2026-01-30 11:18:04 -06:00
Yat Ho
19c52a3e61
fix: pass UTF-8 strings into std::filesystem::path ( #8269 )
...
* feat: temporary replacement for `std::filesystem::u8path()`
* fix: pass UTF-8 strings into `std::filesystem::path`
2026-01-29 08:43:50 -06:00
Charles Kerr
dd008ae1d0
refactor: C++ify tr_torrentStat() ( #8257 )
...
* refactor: callers now own the return value of tr_torrentStat()
fix one potential thread issue by simplifying ownership
* refactor: make tr_stat_errtype an enum class; move into tr_stat
* refactor: order tr_stat fields to reduce padding
* chore: fix branch shear
* fix: int-to-enum-class comparison
* fix: namespace regression
* chore: make clang-tidy happy
2026-01-29 08:07:11 -06:00
Yat Ho
34bf2c5b21
refactor: remove tr_sys_path_get_capacity ( #8249 )
...
* refactor: remove `tr_sys_path_get_capacity`
* code review: remove unused definitions
2026-01-28 21:32:24 -06:00
Charles Kerr
554cc56bdf
refactor: rename our namespace to tr ( #8256 )
...
tr and tr::app are less cluttered than libtransmission:: and transmission::app
2026-01-28 18:11:34 -06:00
Charles Kerr
7559f7ffca
refactor: C++ify tr_torrentPeers() ( #8253 )
...
* refactor: tr_torrentPeers() now returns a std::vector<tr_peer_stat>
* refactor: make tr_peer_stat.client a std::string_view
* refactor: make tr_peer_stat.flag_str a std::string
* refactor: make tr_peer_stat.addr a std::string
* refactor: rename tr_peer_stat field names to camel_case
* refactor: use Speed type for tr_peer_stat speed fields
* refactor: add default initializers to tr_peer_stat fields
* refactor: order tr_peer_stat fields to reduce padding
* fix: typo in [Torrent peers] getter
* refactor: make tr_peer_stat.user_agent a std::string
* refactor: pass by reference instead of by pointer in DetailsDialog
* fixup! refactor: add default initializers to tr_peer_stat fields
2026-01-28 15:16:12 -06:00
Charles Kerr
68e9049b17
refactor: tr_torrentRemove() now takes std::function args ( #8229 )
2026-01-27 14:37:11 -06:00
Charles Kerr
78e733e7bd
refactor: fix trivial modernize-use-ranges warnings ( #8181 )
2026-01-27 12:16:36 -06:00
Yat Ho
2362afd113
refactor: remove tr_isDirection() ( #8213 )
2026-01-26 10:00:02 -06:00
Charles Kerr
03fdb6f48e
refactor: migrate C strings to std::string_view in libtransmission/file.h ( #8220 )
...
* refactor: tr_sys_file_open() now takes a std::string_view arg
* refactor: tr_sys_path_copy() now takes a std::string_view arg
* refactor: tr_blocklistSetContent() now takes a std::string_view arg
* refactor: tr_sys_path_remove() now takes a std::string_view arg
* refactor: tr_sys_path_exists() now takes a std::string_view arg
* refactor: tr_sys_dir_create() now takes a std::string_view arg
* refactor: add private stat_sv(), lstat_sv() helpers in file-posix.cc
* refactor: tr_sys_path_is_same() now takes a std::string_view arg
* refactor: tr_sys_path_rename() now takes a std::string_view arg
2026-01-25 18:39:50 -06:00
Charles Kerr
62be679769
refactor: remove tr_session* argument from tr_rpc_response_func ( #8160 )
2026-01-20 19:44:06 -06:00
Yat Ho
cbc5388440
build: bump to C++20 ( #7191 )
...
* build: bump to C++20
Co-authored-by: Cœur <coeur@gmx.fr >
* refactor: use designated initializers
* refactor: remove redundant SFINAE
* fix: clang-tidy warnings
* chore: comments about min compiler versions for C++20 features
* build: clang objc++ modules build errors
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com >
* refactor: add `TR_CONSTEXPR_VEC` and `TR_CONSTEXPR_STR`
* fix: don't use `std::rel_ops`
* chore: housekeeping
* fix: possible fix for macOS linker error
---------
Co-authored-by: Cœur <coeur@gmx.fr >
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com >
Co-authored-by: Charles Kerr <charles@charleskerr.com >
2026-01-20 16:27:34 -06:00
Charles Kerr
8dea0e863f
fix: several CI errors ( #8124 )
...
* Revert "build(cmake): support building with (almost) all system 3rd-party libraries (#7554 )"
This reverts commit a89ca4f2c9 .
* fixup! refactor: use a map of getters, setters for `session_get` and `session_set` properties (#8024 )
fix: capture-by-reference error in session_accessors()
* fix: 'Qt depends on a UTF-8 locale' CI warning
* fix: 'qt.qpa.xcb: could not connect to display' CI error
2026-01-13 13:16:40 -06:00
Yat Ho
2b2ffd8682
refactor: move anti brute force getters and setters to class methods ( #8076 )
...
* refactor: move `set_anti_brute_force_enabled` to `tr_session`
* refactor: move `is_anti_brute_force_enabled` to `tr_session`
* refactor: move `set_anti_brute_force_limit` to `tr_session`
* refactor: move `get_anti_brute_force_limit` to `tr_session`
2026-01-07 13:05:59 -06:00
Charles Kerr
046de3f6f0
refactor: use a map of getters, setters for session_get and session_set properties ( #8024 )
...
* refactor: session_get, session_set use an accessor table
* fix: lambda capture of structured binding declaration
* fix: readability-identifier-naming
* fix: regression
* chore: remove redundant code
* fix: regression
* chore: fix patch shear after rebase
* fix: namespace regression
Co-authored-by: Yat Ho <lagoho7@gmail.com >
2026-01-02 22:39:37 -06:00
Yat Ho
f93165c0bc
feat: unify encryption mode serialization format for settings.json and rpc ( #8032 )
...
* feat: `settings.json` `encryption` is now string
* feat: api-compat for encryption in `settings.json`
* feat: rpc now uses the same strings as `settings.json` for encryption modes
* feat: api-compat for encryption in rpc
* code review: use `to_variant()`
2026-01-02 11:38:54 -06:00
Yat Ho
ccba9ecd9d
fix: rpcimpl array size ( #8014 )
2025-12-26 11:36:38 -06:00
Yat Ho
1859201e01
refactor: rename cache_size_mb to cache_size_mib ( #7971 )
2025-12-25 14:00:07 -06:00
Yat Ho
a1184061a0
feat: torrent_get.wanted is now boolean ( #7997 )
2025-12-25 11:42:43 -06:00
Yat Ho
62c8edc039
refactor: use api_compat for rpc ( #7995 )
...
* fix: legacy RPC tag should ignore non-integers
* refactor: delegate legacy RPC callback to api-compat
* refactor: move `TR_KEY_alt_speed_down_kebab` handling
* refactor: move `TR_KEY_alt_speed_enabled_kebab` handling
* refactor: move `TR_KEY_alt_speed_time_begin_kebab` handling
* refactor: move `TR_KEY_alt_speed_time_day_kebab` handling
* refactor: move `TR_KEY_alt_speed_time_enabled_kebab` handling
* refactor: move `TR_KEY_alt_speed_time_end_kebab` handling
* refactor: move `TR_KEY_alt_speed_up_kebab` handling
* refactor: move `TR_KEY_anti_brute_force_enabled_kebab` handling
* refactor: move `TR_KEY_anti_brute_force_threshold_kebab` handling
* refactor: move `TR_KEY_blocklist_enabled_kebab` handling
* refactor: move `TR_KEY_blocklist_size_kebab` handling
* refactor: move `TR_KEY_blocklist_url_kebab` handling
* refactor: move `TR_KEY_cache_size_mb_kebab` handling
* refactor: move `TR_KEY_config_dir_kebab` handling
* refactor: move `TR_KEY_default_trackers_kebab` handling
* refactor: move `TR_KEY_dht_enabled_kebab` handling
* refactor: move `TR_KEY_download_dir_kebab` handling
* refactor: move `TR_KEY_download_dir_free_space_kebab` handling
* refactor: move `TR_KEY_download_queue_enabled_kebab` handling
* refactor: move `TR_KEY_download_queue_size_kebab` handling
* refactor: move `TR_KEY_idle_seeding_limit_kebab` handling
* refactor: move `TR_KEY_idle_seeding_limit_enabled_kebab` handling
* refactor: move `TR_KEY_incomplete_dir_kebab` handling
* refactor: move `TR_KEY_incomplete_dir_enabled_kebab` handling
* refactor: move `TR_KEY_lpd_enabled_kebab` handling
* refactor: move `TR_KEY_peer_limit_global_kebab` handling
* refactor: move `TR_KEY_peer_limit_per_torrent_kebab` handling
* refactor: move `TR_KEY_peer_port_kebab` handling
* refactor: move `TR_KEY_peer_port_random_on_start_kebab` handling
* refactor: move `TR_KEY_pex_enabled_kebab` handling
* refactor: move `TR_KEY_port_forwarding_enabled_kebab` handling
* refactor: move `TR_KEY_queue_stalled_enabled_kebab` handling
* refactor: move `TR_KEY_queue_stalled_minutes_kebab` handling
* refactor: move `TR_KEY_rename_partial_files_kebab` handling
* refactor: move `TR_KEY_rpc_version_kebab` handling
* refactor: move `TR_KEY_rpc_version_minimum_kebab` handling
* refactor: move `TR_KEY_rpc_version_semver_kebab` handling
* refactor: move `TR_KEY_script_torrent_added_enabled_kebab` handling
* refactor: move `TR_KEY_script_torrent_added_filename_kebab` handling
* refactor: move `TR_KEY_script_torrent_done_enabled_kebab` handling
* refactor: move `TR_KEY_script_torrent_done_filename_kebab` handling
* refactor: move `TR_KEY_script_torrent_done_seeding_enabled_kebab` handling
* refactor: move `TR_KEY_script_torrent_done_seeding_filename_kebab` handling
* refactor: remove `tr_quark_convert` usage for `tr_session::Scripts`
* refactor: move `TR_KEY_seed_ratio_limit_camel` handling
* refactor: move `TR_KEY_seed_ratio_limited_camel` handling
* refactor: move `TR_KEY_seed_queue_enabled_kebab` handling
* refactor: move `TR_KEY_seed_queue_size_kebab` handling
* refactor: move `TR_KEY_session_id_kebab` handling
* refactor: move `TR_KEY_speed_limit_down_kebab` handling
* refactor: move `TR_KEY_speed_limit_down_enabled_kebab` handling
* refactor: move `TR_KEY_speed_limit_up_kebab` handling
* refactor: move `TR_KEY_speed_limit_up_enabled_kebab` handling
* refactor: move `TR_KEY_start_added_torrents_kebab` handling
* refactor: move `TR_KEY_tcp_enabled_kebab` handling
* refactor: move `TR_KEY_trash_original_torrent_files_kebab` handling
* refactor: move `TR_KEY_utp_enabled_kebab` handling
* refactor: move `TR_KEY_recently_active_kebab` handling
* refactor: move `TR_KEY_delete_local_data_kebab` handling
* refactor: move `TR_KEY_activity_date_camel` handling
* refactor: move `TR_KEY_added_date_camel` handling
* refactor: move `TR_KEY_bandwidth_priority_camel` handling
* refactor: move `TR_KEY_bytes_completed_camel` handling
* refactor: move `TR_KEY_corrupt_ever_camel` handling
* refactor: move `TR_KEY_date_created_camel` handling
* refactor: move `TR_KEY_desired_available_camel` handling
* refactor: move `TR_KEY_done_date_camel` handling
* refactor: move `TR_KEY_download_dir_camel` handling
* refactor: move `TR_KEY_download_limit_camel` handling
* refactor: move `TR_KEY_download_limited_camel` handling
* refactor: move `TR_KEY_downloaded_ever_camel` handling
* refactor: move `TR_KEY_edit_date_camel` handling
* refactor: move `TR_KEY_error_string_camel` handling
* refactor: move `TR_KEY_eta_idle_camel` handling
* refactor: move `TR_KEY_file_stats_camel` handling
* refactor: move `TR_KEY_file_count_kebab` handling
* refactor: move `TR_KEY_hash_string_camel` handling
* refactor: move `TR_KEY_have_unchecked_camel` handling
* refactor: move `TR_KEY_have_valid_camel` handling
* refactor: move `TR_KEY_honors_session_limits_camel` handling
* refactor: move `TR_KEY_is_finished_camel` handling
* refactor: move `TR_KEY_is_private_camel` handling
* refactor: move `TR_KEY_is_stalled_camel` handling
* refactor: move `TR_KEY_left_until_done_camel` handling
* refactor: move `TR_KEY_magnet_link_camel` handling
* refactor: move `TR_KEY_manual_announce_time_camel` handling
* refactor: move `TR_KEY_max_connected_peers_camel` handling
* refactor: move `TR_KEY_metadata_percent_complete_camel` handling
* refactor: move `TR_KEY_peer_limit_kebab` handling
* refactor: move `TR_KEY_peers_connected_camel` handling
* refactor: move `TR_KEY_peers_from_camel` handling
* refactor: move `TR_KEY_peers_getting_from_us_camel` handling
* refactor: move `TR_KEY_peers_sending_to_us_camel` handling
* refactor: move `TR_KEY_percent_complete_camel` handling
* refactor: move `TR_KEY_percent_done_camel` handling
* refactor: move `TR_KEY_piece_count_camel` handling
* refactor: move `TR_KEY_piece_size_camel` handling
* refactor: move `TR_KEY_primary_mime_type_kebab` handling
* refactor: move `TR_KEY_queue_position_camel` handling
* refactor: move `TR_KEY_rate_download_camel` handling
* refactor: move `TR_KEY_rate_upload_camel` handling
* refactor: move `TR_KEY_recheck_progress_camel` handling
* refactor: move `TR_KEY_seconds_downloading_camel` handling
* refactor: move `TR_KEY_seconds_seeding_camel` handling
* refactor: move `TR_KEY_seed_idle_limit_camel` handling
* refactor: move `TR_KEY_seed_idle_mode_camel` handling
* refactor: move `TR_KEY_seed_ratio_mode_camel` handling
* refactor: move `TR_KEY_size_when_done_camel` handling
* refactor: move `TR_KEY_start_date_camel` handling
* refactor: move `TR_KEY_torrent_file_camel` handling
* refactor: move `TR_KEY_total_size_camel` handling
* refactor: move `TR_KEY_tracker_list_camel` handling
* refactor: move `TR_KEY_tracker_stats_camel` handling
* refactor: move `TR_KEY_upload_limit_camel` handling
* refactor: move `TR_KEY_upload_limited_camel` handling
* refactor: move `TR_KEY_upload_ratio_camel` handling
* refactor: move `TR_KEY_uploaded_ever_camel` handling
* refactor: move `TR_KEY_webseeds_sending_to_us_camel` handling
* refactor: move `TR_KEY_announce_state_camel` handling
* refactor: move `TR_KEY_download_count_camel` handling
* refactor: move `TR_KEY_has_announced_camel` handling
* refactor: move `TR_KEY_has_scraped_camel` handling
* refactor: move `TR_KEY_is_backup_camel` handling
* refactor: move `TR_KEY_last_announce_peer_count_camel` handling
* refactor: move `TR_KEY_last_announce_result_camel` handling
* refactor: move `TR_KEY_last_announce_start_time_camel` handling
* refactor: move `TR_KEY_last_announce_succeeded_camel` handling
* refactor: move `TR_KEY_last_announce_time_camel` handling
* refactor: move `TR_KEY_last_announce_timed_out_camel` handling
* refactor: move `TR_KEY_last_scrape_result_camel` handling
* refactor: move `TR_KEY_last_scrape_start_time_camel` handling
* refactor: move `TR_KEY_last_scrape_succeeded_camel` handling
* refactor: move `TR_KEY_last_scrape_time_camel` handling
* refactor: move `TR_KEY_last_scrape_timed_out_camel` handling
* refactor: move `TR_KEY_leecher_count_camel` handling
* refactor: move `TR_KEY_next_announce_time_camel` handling
* refactor: move `TR_KEY_next_scrape_time_camel` handling
* refactor: move `TR_KEY_scrape_state_camel` handling
* refactor: move `TR_KEY_seeder_count_camel` handling
* refactor: move `TR_KEY_client_is_choked_camel` handling
* refactor: move `TR_KEY_client_is_interested_camel` handling
* refactor: move `TR_KEY_client_name_camel` handling
* refactor: move `TR_KEY_flag_str_camel` handling
* refactor: move `TR_KEY_is_downloading_from_camel` handling
* refactor: move `TR_KEY_is_encrypted_camel` handling
* refactor: move `TR_KEY_is_incoming_camel` handling
* refactor: move `TR_KEY_is_utp_camel` handling
* refactor: move `TR_KEY_is_uploading_to_camel` handling
* refactor: move `TR_KEY_peer_is_choked_camel` handling
* refactor: move `TR_KEY_peer_is_interested_camel` handling
* refactor: move `TR_KEY_rate_to_client_camel` handling
* refactor: move `TR_KEY_rate_to_peer_camel` handling
* refactor: move `TR_KEY_from_cache_camel` handling
* refactor: move `TR_KEY_from_dht_camel` handling
* refactor: move `TR_KEY_from_incoming_camel` handling
* refactor: move `TR_KEY_from_lpd_camel` handling
* refactor: move `TR_KEY_from_ltep_camel` handling
* refactor: move `TR_KEY_from_pex_camel` handling
* refactor: move `TR_KEY_from_pex_camel` handling
* refactor: move `TR_KEY_tracker_add_camel` handling
* refactor: move `TR_KEY_tracker_remove_camel` handling
* refactor: move `TR_KEY_tracker_replace_camel` handling
* refactor: move `TR_KEY_downloaded_bytes_camel` handling
* refactor: move `TR_KEY_files_added_camel` handling
* refactor: move `TR_KEY_seconds_active_camel` handling
* refactor: move `TR_KEY_session_count_camel` handling
* refactor: move `TR_KEY_uploaded_bytes_camel` handling
* refactor: move `TR_KEY_active_torrent_count_camel` handling
* refactor: move `TR_KEY_cumulative_stats_kebab` handling
* refactor: move `TR_KEY_cumulative_stats_kebab` handling
* refactor: move `TR_KEY_download_speed_camel` handling
* refactor: move `TR_KEY_paused_torrent_count_camel` handling
* refactor: move `TR_KEY_torrent_count_camel` handling
* refactor: move `TR_KEY_upload_speed_camel` handling
* refactor: move `TR_KEY_files_unwanted_kebab` handling
* refactor: move `TR_KEY_files_wanted_kebab` handling
* refactor: move `TR_KEY_priority_high_kebab` handling
* refactor: move `TR_KEY_priority_low_kebab` handling
* refactor: move `TR_KEY_priority_normal_kebab` handling
* refactor: move `TR_KEY_port_is_open_kebab` handling
* refactor: move `TR_KEY_torrent_duplicate_kebab` handling
* refactor: move `TR_KEY_torrent_added_kebab` handling
* refactor: move `TR_KEY_memory_bytes_kebab` handling
* refactor: move `TR_KEY_memory_units_kebab` handling
* refactor: move `TR_KEY_size_bytes_kebab` handling
* refactor: move `TR_KEY_size_units_kebab` handling
* refactor: move `TR_KEY_speed_bytes_kebab` handling
* refactor: move `TR_KEY_speed_units_kebab` handling
* refactor: remove DoneCb
* perf: adjust reserve capacity
2025-12-24 13:29:59 -06:00
Charles Kerr
433203f82f
perf: unmanaged strings in rpcimpl ( #7975 )
...
* perf: in rpcimpl, use tr_variant::unmanaged_string() for unit strings
* perf: in rpcimpl, use tr_variant::unmanaged_string() encryption mode
* perf: in rpcimpl, use tr_variant::unmanaged_string() for TrRpcVersionSemver
2025-12-21 11:17:53 -06:00
Charles Kerr
3fc8003c02
refactor: remove tr_variant::StringHolder ( #7953 )
...
* perf: remove tr_variant::StringHolder
* fix: disallow get_if<std::string>() and get_if<std::string_view>()
* refactor: remove `tr_variant::VisitAdapter` (#7960 )
Co-authored-by: Yat Ho <lagoho7@gmail.com >
2025-12-19 22:24:39 -06:00
Yat Ho
f61b0213a9
feat: add X-Transmission-Rpc-Version ( #7958 )
2025-12-19 10:03:37 -06:00
Cœur
c56723ef1f
chore: compatibility with clang-format 20 to 21 ( #7499 )
2025-12-15 23:55:32 -06:00
Charles Kerr
9a792046f3
feat: add libtransmission::api_compat::convert() ( #7917 )
...
Add a module to convert between tr4 and tr5 RPC / settings / config file payloads.
This will be used as a compatibility layer between Transmission 5's naming scheme
and Transmission <= 4.
Co-authored-by: Yat Ho <lagoho7@gmail.com >
Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com >
2025-12-14 10:56:07 -06:00
Charles Kerr
9f911d4d52
refactor: intern recently-active ( #7909 )
...
* refactor: intern recently-active
* fixup! refactor: intern recently-active
fix a couple of literals missed in rpcimpl.cc
2025-12-09 21:15:07 -06:00
Charles Kerr
64231c1076
refactor: extract-method is_valid_id() in rpcimpl ( #7907 )
2025-12-09 18:18:46 -06:00
Charles Kerr
0979bbcc3f
refactor: intern RPC method names ( #7892 )
...
* refactor: add quarks for the RPC method names
* update tr_quark_convert() to handle RPC method names
* refactor: use interned keys for RPC method names
* test: add torrentGetLegacy test
* refactor: use interned keys for RPC method names in tr-qt
* refactor: use interned keys for RPC method names in tr-remote
* refactor: use interned keys for RPC method names in tests
* refactor: use interned keys for RPC method names in tr-gtk
* chore: fix readability-identifier-naming regression
2025-12-09 11:48:09 -06:00
Yat Ho
9dd9aab902
build: bump clang tools to 20 ( #7573 )
...
* build: bump to clang-format-20
* build: bump to clang-tidy-20
* chore: revert edc59ba5d8
2025-12-01 23:18:02 -06:00
Yat Ho
05aef3e787
refactor: unify quarks and strings to snake_case ( #7108 )
...
* refactor: change `leftUntilDone` to `left_until_done`
* refactor: change `magnetLink` to `magnet_link`
* refactor: change `manualAnnounceTime` to `manual_announce_time`
* refactor: change `maxConnectedPeers` to `max_connected_peers`
* refactor: change `metadataPercentComplete` to `metadata_percent_complete`
* refactor: change `peersConnected` to `peers_connected`
* refactor: change `peersFrom` to `peers_from`
* refactor: change `peersGettingFromUs` to `peers_getting_from_us`
* refactor: change `peersSendingToUs` to `peers_sending_to_us`
* refactor: change `percentComplete` to `percent_complete`
* refactor: change `percentDone` to `percent_done`
* refactor: change `pieceCount` to `piece_count`
* refactor: use quark when possible
* refactor: change `pieceSize` to `piece_size`
* refactor: change `primary-mime-type` to `primary_mime_type`
* refactor: change `rateDownload` to `rate_download`
* refactor: change `rateUpload` to `rate_upload`
* refactor: change `recheckProgress` to `recheck_progress`
* refactor: change `secondsDownloading` to `seconds_downloading`
* refactor: change `secondsSeeding` to `seconds_seeding`
* refactor: change `sizeWhenDone` to `size_when_done`
* refactor: change `startDate` to `start_date`
* refactor: change `trackerStats` to `tracker_stats`
* refactor: change `totalSize` to `total_size`
* refactor: change `torrentFile` to `torrent_file`
* refactor: change `uploadedEver` to `uploaded_ever`
* refactor: change `uploadRatio` to `upload_ratio`
* refactor: change `webseedsSendingToUs` to `webseeds_sending_to_us`
* refactor: change `bytesCompleted` to `bytes_completed`
* refactor: change `clientName` to `client_name`
* refactor: change `clientIsChoked` to `client_is_choked`
* refactor: change `clientIsInterested` to `client_is_interested`
* refactor: change `flagStr` to `flag_str`
* refactor: change `isDownloadingFrom` to `is_downloading_from`
* refactor: change `isEncrypted` to `is_encrypted`
* refactor: change `isIncoming` to `is_incoming`
* refactor: change `isUploadingTo` to `is_uploading_to`
* refactor: change `isUTP` to `is_utp`
* refactor: change `peerIsChoked` to `peer_is_choked`
* refactor: change `peerIsInterested` to `peer_is_interested`
* refactor: change `rateToClient` to `rate_to_client`
* refactor: change `rateToPeer` to `rate_to_peer`
* refactor: change `fromCache` to `from_cache`
* refactor: change `fromDht` to `from_dht`
* refactor: change `fromIncoming` to `from_incoming`
* refactor: change `fromLpd` to `from_lpd`
* refactor: change `fromLtep` to `from_ltep`
* refactor: change `fromPex` to `from_pex`
* refactor: change `fromTracker` to `from_tracker`
* refactor: change `announceState` to `announce_state`
* refactor: change `downloadCount` to `download_count`
* refactor: change `hasAnnounced` to `has_announced`
* refactor: change `hasScraped` to `has_scraped`
* refactor: change `isBackup` to `is_backup`
* refactor: change `lastAnnouncePeerCount` to `last_announce_peer_count`
* refactor: change `lastAnnounceResult` to `last_announce_result`
* refactor: change `lastAnnounceStartTime` to `last_announce_start_time`
* refactor: change `lastAnnounceSucceeded` to `last_announce_succeeded`
* refactor: change `lastAnnounceTime` to `last_announce_time`
* refactor: change `lastAnnounceTimedOut` to `last_announce_timed_out`
* refactor: change `lastScrapeResult` to `last_scrape_result`
* refactor: change `lastScrapeStartTime` to `last_scrape_start_time`
* refactor: change `lastScrapeSucceeded` to `last_scrape_succeeded`
* refactor: change `lastScrapeTime` to `last_scrape_time`
* refactor: change `lastScrapeTimedOut` to `last_scrape_timed_out`
* refactor: change `leecherCount` to `leecher_count`
* refactor: change `nextAnnounceTime` to `next_announce_time`
* refactor: change `nextScrapeTime` to `next_scrape_time`
* refactor: change `scrapeState` to `scrape_state`
* refactor: change `seederCount` to `seeder_count`
* refactor: change `torrent-added` to `torrent_added`
* refactor: change `torrent-duplicate` to `torrent_duplicate`
* refactor: change `torrent-remove` to `torrent_remove`
* refactor: change `delete-local-data` to `delete_local_data`
* refactor: change `torrent-rename-path` to `torrent_rename_path`
* refactor: change `alt-speed-down` to `alt_speed_down`
* refactor: convert `pref_toggle_entries` to quark array
* refactor: change `alt-speed-enabled` to `alt_speed_enabled`
* refactor: change `compact-view` to `compact_view`
* refactor: change `sort-reversed` to `sort_reversed`
* refactor: change `show-filterbar` to `show_filterbar`
* refactor: change `show-statusbar` to `show_statusbar`
* refactor: change `show-toolbar` to `show_toolbar`
* refactor: change `alt-speed-time-begin` to `alt_speed_time_begin`
* refactor: change `alt-speed-time-day` to `alt_speed_time_day`
* refactor: change `alt-speed-time-end` to `alt_speed_time_end`
* refactor: change `alt-speed-up` to `alt_speed_up`
* refactor: change `alt-speed-time-enabled` to `alt_speed_time_enabled`
* refactor: change `blocklist-enabled` to `blocklist_enabled`
* refactor: change `blocklist-size` to `blocklist_size`
* refactor: change `blocklist-url` to `blocklist_url`
* refactor: change `cache-size-mb` to `cache_size_mb`
* refactor: change `config-dir` to `config_dir`
* refactor: change `default-trackers` to `default_trackers`
* refactor: change `dht-enabled` to `dht_enabled`
* refactor: change `download-dir-free-space` to `download_dir_free_space`
* refactor: change `download-queue-enabled` to `download_queue_enabled`
* refactor: change `download-queue-size` to `download_queue_size`
* refactor: change `idle-seeding-limit-enabled` to `idle_seeding_limit_enabled`
* refactor: change `idle-seeding-limit` to `idle_seeding_limit`
* refactor: change `incomplete-dir-enabled` to `incomplete_dir_enabled`
* refactor: change `incomplete-dir` to `incomplete_dir`
* refactor: change `lpd-enabled` to `lpd_enabled`
* refactor: change `peer-limit-global` to `peer_limit_global`
* refactor: change `peer-limit-per-torrent` to `peer_limit_per_torrent`
* refactor: change `peer-port-random-on-start` to `peer_port_random_on_start`
* refactor: change `peer-port` to `peer_port`
* refactor: change `pex-enabled` to `pex_enabled`
* refactor: change `port-forwarding-enabled` to `port_forwarding_enabled`
* refactor: change `queue-stalled-enabled` to `queue_stalled_enabled`
* refactor: change `queue-stalled-minutes` to `queue_stalled_minutes`
* refactor: change `rename-partial-files` to `rename_partial_files`
* refactor: change `rpc-version-minimum` to `rpc_version_minimum`
* refactor: change `rpc-version-semver` to `rpc_version_semver`
* refactor: change `rpc-version` to `rpc_version`
* refactor: change `script-torrent-added-enabled` to `script_torrent_added_enabled`
* refactor: change `script-torrent-added-filename` to `script_torrent_added_filename`
* refactor: change `script-torrent-done-enabled` to `script_torrent_done_enabled`
* refactor: change `script-torrent-done-filename` to `script_torrent_done_filename`
* refactor: change `script-torrent-done-seeding-enabled` to `script_torrent_done_seeding_enabled`
* refactor: change `script-torrent-done-seeding-filename` to `script_torrent_done_seeding_filename`
* refactor: change `seed-queue-enabled` to `seed_queue_enabled`
* refactor: change `seed-queue-size` to `seed_queue_size`
* refactor: change `seedRatioLimited` to `seed_ratio_limited`
* refactor: change `session-id` to `session_id`
* refactor: change `speed-limit-down-enabled` to `speed_limit_down_enabled`
* refactor: change `speed-limit-down` to `speed_limit_down`
* refactor: change `speed-limit-up-enabled` to `speed_limit_up_enabled`
* refactor: change `speed-limit-up` to `speed_limit_up`
* refactor: change `start-added-torrents` to `start_added_torrents`
* refactor: change `trash-original-torrent-files` to `trash_original_torrent_files`
* refactor: change `utp-enabled` to `utp_enabled`
* refactor: change `tcp-enabled` to `tcp_enabled`
* docs: add missing docs for RPC `tcp_enabled`
* refactor: change `speed-units` to `speed_units`
* refactor: change `speed-bytes` to `speed_bytes`
* refactor: change `size-units` to `size_units`
* refactor: change `size-bytes` to `size_bytes`
* refactor: change `memory-units` to `memory_units`
* refactor: change `memory-bytes` to `memory_bytes`
* refactor: change `session-set` to `session_set`
* refactor: change `session-get` to `session_get`
* refactor: change `session-stats` to `session_stats`
* refactor: change `activeTorrentCount` to `active_torrent_count`
* refactor: change `downloadSpeed` to `download_speed`
* refactor: change `pausedTorrentCount` to `paused_torrent_count`
* refactor: change `torrentCount` to `torrent_count`
* refactor: change `uploadSpeed` to `upload_speed`
* refactor: change `cumulative-stats` to `cumulative_stats`
* refactor: change `current-stats` to `current_stats`
* refactor: change `uploadedBytes` and `uploaded-bytes` to `uploaded_bytes`
* refactor: change `downloadedBytes` and `downloaded-bytes` to `downloaded_bytes`
* refactor: change `filesAdded` and `files-added` to `files_added`
* refactor: change `sessionCount` and `session-count` to `session_count`
* refactor: change `secondsActive` and `seconds-active` to `seconds_active`
* refactor: change `blocklist-update` to `blocklist_update`
* refactor: change `port-test` to `port_test`
* refactor: change `session-close` to `session_close`
* refactor: change `queue-move-top` to `queue_move_top`
* refactor: change `queue-move-up` to `queue_move_up`
* refactor: change `queue-move-down` to `queue_move_down`
* refactor: change `queue-move-bottom` to `queue_move_bottom`
* refactor: change `free-space` to `free_space`
* refactor: change `group-set` to `group_set`
* refactor: change `group-get` to `group_get`
* refactor: change `announce-ip` to `announce_ip`
* refactor: change `announce-ip-enabled` to `announce_ip_enabled`
* refactor: change `upload-slots-per-torrent` to `upload_slots_per_torrent`
* refactor: change `trash-can-enabled` to `trash_can_enabled`
* refactor: change `watch-dir-enabled` to `watch_dir_enabled`
* refactor: change `watch-dir-force-generic` to `watch_dir_force_generic`
* refactor: change `watch-dir` to `watch_dir`
* refactor: change `message-level` to `message_level`
* refactor: change `scrape-paused-torrents-enabled` to `scrape_paused_torrents_enabled`
* refactor: change `torrent-added-verify-mode` to `torrent_added_verify_mode`
* refactor: change `sleep-per-seconds-during-verify` to `sleep_per_seconds_during_verify`
* refactor: change `bind-address-ipv4` to `bind_address_ipv4`
* refactor: change `bind-address-ipv6` to `bind_address_ipv6`
* refactor: change `peer-congestion-algorithm` to `peer_congestion_algorithm`
* refactor: change `peer-socket-tos` to `peer_socket_tos`
* refactor: change `peer-port-random-high` to `peer_port_random_high`
* refactor: change `peer-port-random-low` to `peer_port_random_low`
* refactor: change `anti-brute-force-enabled` to `anti_brute_force_enabled`
* refactor: change `rpc-authentication-required` to `rpc_authentication_required`
* refactor: change `rpc-bind-address` to `rpc_bind_address`
* refactor: change `rpc-enabled` to `rpc_enabled`
* refactor: change `rpc-host-whitelist` to `rpc_host_whitelist`
* refactor: change `rpc-host-whitelist-enabled` to `rpc_host_whitelist_enabled`
* refactor: change `rpc-password` to `rpc_password`
* refactor: change `rpc-port` to `rpc_port`
* refactor: change `rpc-socket-mode` to `rpc_socket_mode`
* refactor: change `rpc-url` to `rpc_url`
* refactor: change `rpc-username` to `rpc_username`
* refactor: change `rpc-whitelist` to `rpc_whitelist`
* refactor: change `rpc-whitelist-enabled` to `rpc_whitelist_enabled`
* refactor: change `ratio-limit-enabled` to `ratio_limit_enabled`
* refactor: change `ratio-limit` to `ratio_limit`
* refactor: change `show-options-window` to `show_options_window`
* refactor: change `open-dialog-dir` to `open_dialog_dir`
* refactor: change `inhibit-desktop-hibernation` to `inhibit_desktop_hibernation`
* refactor: change `show-notification-area-icon` to `show_notification_area_icon`
* refactor: change `start-minimized` to `start_minimized`
* refactor: change `torrent-added-notification-enabled` to `torrent_added_notification_enabled`
* refactor: change `anti-brute-force-threshold` to `anti_brute_force_threshold`
* refactor: change `torrent-complete-notification-enabled` to `torrent_complete_notification_enabled`
* refactor: change `prompt-before-exit` to `prompt_before_exit`
* refactor: change `sort-mode` to `sort_mode`
* refactor: change `statusbar-stats` to `statusbar_stats`
* refactor: change `show-extra-peer-details` to `show_extra_peer_details`
* refactor: change `show-backup-trackers` to `show_backup_trackers`
* refactor: change `blocklist-date` to `blocklist_date`
* refactor: change `blocklist-updates-enabled` to `blocklist_updates_enabled`
* refactor: change `main-window-layout-order` to `main_window_layout_order`
* refactor: change `main-window-height` to `main_window_height`
* refactor: change `main-window-width` to `main_window_width`
* refactor: change `main-window-x` to `main_window_x`
* refactor: change `main-window-y` to `main_window_y`
* refactor: change `filter-mode` to `filter_mode`
* refactor: change `filter-trackers` to `filter_trackers`
* refactor: change `filter-text` to `filter_text`
* refactor: change `remote-session-enabled` to `remote_session_enabled`
* refactor: change `remote-session-host` to `remote_session_host`
* refactor: change `remote-session-https` to `remote_session_https`
* refactor: change `remote-session-password` to `remote_session_password`
* refactor: change `remote-session-port` to `remote_session_port`
* refactor: change `remote-session-requres-authentication` to `remote_session_requires_authentication`
* refactor: change `remote-session-username` to `remote_session_username`
* refactor: change `torrent-complete-sound-command` to `torrent_complete_sound_command`
* refactor: change `torrent-complete-sound-enabled` to `torrent_complete_sound_enabled`
* refactor: change `user-has-given-informed-consent` to `user_has_given_informed_consent`
* refactor: change `read-clipboard` to `read_clipboard`
* refactor: change `details-window-height` to `details_window_height`
* refactor: change `details-window-width` to `details_window_width`
* refactor: change `main-window-is-maximized` to `main_window_is_maximized`
* refactor: change `port-is-open` to `port_is_open`
* refactor: change `show-tracker-scrapes` to `show_tracker_scrapes`
* refactor: change `max-peers` to `max_peers`
* refactor: change `peers2-6` to `peers2_6`
* refactor: change `seeding-time-seconds` to `seeding_time_seconds`
* refactor: change `downloading-time-seconds` to `downloading_time_seconds`
* refactor: change `ratio-mode` to `ratio_mode`
* refactor: change `idle-limit` to `idle_limit`
* refactor: change `idle-mode` to `idle_mode`
* refactor: change `speed-Bps` to `speed_Bps`
* refactor: change `use-global-speed-limit` to `use_global_speed_limit`
* refactor: change `use-speed-limit` to `use_speed_limit`
* chore: remove TODO comment
* docs: add upgrade instructions to `5.0.0`
* chore: bump rpc semver major version
* chore: housekeeping
2025-12-01 16:08:18 -06:00
Yat Ho
1cb24a701b
feat: new JSON-RPC 2.0 RPC API ( #7269 )
...
* feat: add enum for JSON-RPC error codes
* feat: new `tr_rpc_request_exec()` overload that accepts string
* feat: add JSON-RPC parse error handling
* feat: add logic for branching to JSON-RPC or legacy API
* feat: error codes for existing errors strings
* refactor: async handlers now take the done cb as parameter
* feat: support non-batch JSON-RPC requests
* feat: support batch JSON-RPC requests
* refactor: move JSON-RPC error codes to header
* test: new tests for JSON-RPC
* refactor(webui): use jsonrpc api
* docs: update docs for jsonrpc
* fix: clang-tidy warning
* perf: avoid copying callback in batch mode
* code review: don't commit to dropping old RPC
* chore: fix shadowed variable warnings
2025-11-30 10:04:40 -06:00
Yat Ho
8dc5d925fe
feat: convert preferred-transport to preferred_transports ( #7473 )
...
* feat: store `preferred_transports` as array in `settings.json`
* refactor: `Settings::save()` returns `tr_variant::Map`
* feat: new RPC API for `preferred_transports`
* feat: new arg `--preferred-transports` for remote
2025-11-12 17:17:29 -06:00
Yat Ho
48ec09771c
feat: add downloader_count to trackerStats ( #6936 )
2025-11-12 10:23:37 -06:00
Geoffrey Bonneville
0f7f460c55
feat: allow downloading sequentially from a specific piece ( #7502 )
...
* feat: allow downloading sequentially from a specific piece
* Apply review changes
Co-authored-by: Yat Ho <lagoho7@gmail.com >
* Use sequential_download_from_piece param in torrent-add, and save it to resume file
* fix: change observable type bool -> tr_piece_index_t
* fix: run code_style.sh
* fix: improved test and missing comment
Co-authored-by: Yat Ho <lagoho7@gmail.com >
* fix: apply similar changes to sequentialDownloadFromPiece test
* docs: change parameter type boolean -> number
---------
Co-authored-by: Yat Ho <lagoho7@gmail.com >
2025-11-11 09:32:57 -06:00
Charles Kerr
a5d09b29ff
chore: move tr_rpc_parse_list_str() from libtransmission to remote.cc ( #7797 )
...
libtransmission hasn't used this since 822fabb2 (#3549 )
2025-11-11 09:31:19 -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
d0996479de
feat: add bytesCompleted field to torrent-get rpc ( #7173 )
...
* add bytesCompleted field to torrent_get rpc
* update bytesCompleted rpc doc
2025-11-08 10:05:21 -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
Yat Ho
c215de34d5
chore: move away from fmt/core.h ( #7557 )
2025-05-06 01:01:12 -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