308 Commits

Author SHA1 Message Date
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
fece4137c7 refactor: add tr_variant::unmanaged_string(tr_quark) (#7906)
* feat: add tr_variant::unmanaged_string(tr_quark)

* refactor: use tr_variant::unmanaged_string(tr_quark)
2025-12-09 14:58:15 -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
Charles Kerr
73e6892a74 refactor: let client pass in translated string of None when calling tr_strratio() (#7805) 2025-11-14 10:04:04 -06:00
Yat Ho
cfd5647c58 feat(remote): print seq download from piece in tor details (#7808) 2025-11-14 10:02:13 -06:00
Yat Ho
cf93d52f03 feat(remote): optionally specify piece to start sequentially download (#7809) 2025-11-14 09:39:47 -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
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
Elek, David
d0e6b5519d fix speed rate conversion, when requesting peer info (#7796) 2025-11-10 14:08:39 -06:00
Charles Kerr
db67c258a9 refactor: don't use evbuffer in transmission-remote (#7739)
* refactor: remove evbuffer use in transmission-remote

Keep reducing our libevent API use, especially outside of libtransmission

* chore: reduce some unnecessary diffs to main
2025-10-27 18:30:25 -05:00
Yat Ho
9055650c8f refactor(remote): delegate percent done calculation to core (#7622) 2025-10-17 17:58:59 -05:00
Yat Ho
9c14fa58d8 feat: allow optional arguments in tr_getopt() (#7510)
* feat: allow optional arguments in `tr_getopt()`

* test: new tests for optional arg

* code review: `using Arg = tr_option::Arg`

* refactor: static assert option array size

* test: add new tests for missing arguments in the middle

* test: static auto constexpr
2025-10-15 12:08:11 -05:00
Yat Ho
fb25228f24 chore: bump {fmt} to 11.2.0 and fix compatibility (#7612)
* chore: bump fmt to 11.2.0

Acquire 6797f0c39a, which fixes compile error on GCC 15.1.

Acquire
9f269062a7,
which fixes buffer overflow in NetBSD 10.1 on GCC 10.5.

Replace `fmt::localtime` with `std::localtime`, as `fmt::` is now
deprecated.

* fix: format timezone ourselves on Windows

{fmt} 11.2.0 removed the ability to format `std::tm` with the format specifier `%z` on Windows, for a good reason. Ref: https://github.com/fmtlib/fmt/issues/4444

This forces us to implement our own solution on Windows as there's no alternative.

* fix: support `FMT_USE_EXCEPTIONS`
2025-10-14 12:53:08 -05:00
Yat Ho
a5884203fd fix(remote): no-sequential-download description (#7646) 2025-10-14 11:27:35 -05:00
Yat Ho
08ec7fb7c7 build: lint header files with clang-tidy (#7527)
* build: clang-tidy headers when building libtransmission

* chore: revert `= default` workaround

It was introduced in 6909ec0bad to fix build issues with macOS 10.14. We
no longer support that version.

* fix: clang-tidy warnings for libtransmission

* build: clang-tidy headers when building tests

* fix: clang-tidy warnings for tests

* build: clang-tidy headers when building qt

* code review: don't manually edit mime-types.h

* code review: unify variable naming for static private members
2025-05-07 22:10:16 +01:00
Yat Ho
f0c8fd689a fix(remote): print label separators correctly (#7535) 2025-05-06 22:09:29 +01: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
Yat Ho
86e904d1a2 feat: sequential download cmdline options in remote and daemon (#7048)
* feat: add seq option in remote

* feat: print session sequential download setting in remote

* refactor: assert options torrent size in daemon

* feat: add seq option in daemon
2025-03-10 16:16:25 -05:00
Dzmitry Neviadomski
7e87adcd91 Fix building transmission with C++23 (#6832)
* fix: operator== should return bool in tr_strbuf

Fixes build error with C++20/C++23

error: return type 'auto' of selected 'operator==' function for rewritten '!=' comparison is not 'bool'

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: explicitly specify Blocklist::size() return type as size_t

Fixes building with C++20/C++23
error: no matching function for call to 'size'
function 'size' with deduced return type cannot be used before it is defined

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: wrap runtime format strings with fmt::runtime in library, daemon and cli

fmt::format_string ctor is consteval with C++20
See https://github.com/fmtlib/fmt/issues/2438

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: wrap runtime format strings with fmt::runtime for GTK client

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: allow to override C and CXX standard via cmdline or env

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: add job to check if transmission compiles with C++23

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Address code review by mikedld

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix new found fmt build errors

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* Address code review by tearfur

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

* fix: make tr_net_init_mgr singleton buildable with C++23

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>

---------

Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2025-03-10 13:08:57 -05:00
Bheesham Persaud
1232f558a6 fix(remote): failure reason should be printed (#7034)
Uses `fmt::print` to log failure messages. Results in a connection
failure being printed as:

    Unable to send request to 'http://localhost:9091/transmission/rpc/': Couldn't connect to server

Fixes #7010
2025-03-10 01:04:10 -05:00
Yat Ho
131caa1239 refactor: convert tr_net_init_mgr to singleton (#6914) 2024-12-30 09:32:11 -06:00
Yat Ho
1e16912ae4 refactor: new tr_variant API in transmission-remote and other cleanup (#6798)
* refactor: remove `Arguments`

* refactor: replace pointer args with lvalue reference

* refactor: use `uint16_t` for port number

* chore: housekeeping

* refactor: replace `char*` with `std::string_view`

* refactor: simplify argument parsing code

* refactor: use new `tr_variant` API in remote

* chore: rename function to snake_case

* chore: move `break` statements in switches outside of compound statements

* chore: use `std::string` literals

* refactor: extract tor start/stop to `MODE_TORRENT_START_STOP`

* refactor: extract tor actions to `MODE_TORRENT_ACTION`

* chore: iwyu

* fix: msvc build failure

* chore: misc cleanup

* fix: dereference optional

* chore: misc cleanup

* ui: fix minor formatting errors

* fix: remove redundant if branches for response string

* code review: remove `o` prefix for optionals

* code review: add condition clause

* code review: check `left_until_done` instead

* fix: unchecked nullptr

* code review: don't reassign method name

* code review: revert accidentally renaming `addIdArg` to `get_id_arg`

* code review: use `TR_ASSERT` instead of `assert`

* refactor: fix static auto constexpr naming

* code review: assert array size

* code review: assert that `arguments` key exists
2024-08-17 20:04:49 +01:00
Luukas Pörtfors
88d280be8f feat(remote): implement idle seeding limits (#2947) 2024-05-27 15:08:33 -05:00
Yat Ho
edddf9d80e fix: torrent details speed info unit (#6845) 2024-05-25 16:43:38 -05:00
Yat Ho
9748f42c5a fix: restore portable file path check (#6853)
* chore: change to snake_case naming

* fix: restore portable file path check

* fix: macosx build
2024-05-25 10:08:53 -05:00
Cœur
740ce3b904 Avoiding "sec" as abbreviation (#6828)
* Avoiding "sec" as abbreviation

* code review: KBit -> Kb
2024-05-24 10:34:05 -05:00
Pooyan Khanjankhani
821a6816ef doc: fix typo (#6790) 2024-04-21 18:21:17 -05:00
Charles Kerr
3f6969217c chore: remove FMT_STRING macros (#6497) 2024-01-06 14:05:18 -06:00
Charles Kerr
ea52e75476 fixup! chore: fix misc-use-anonymous-namespace warnings from clang-tidy (#6488) (#6498)
fix: tyop
2024-01-06 13:04:50 -06:00
Charles Kerr
646883174b chore: fix misc-use-anonymous-namespace warnings from clang-tidy (#6488) 2024-01-04 23:12:51 -06:00
Yat Ho
7573a98bb4 ui: unify percent done format in transmission-remote (#6447)
* ui: unify percent done display format in `remote`

* fix: adjust field width for the new format
2023-12-29 14:55:06 -06:00
Yat Ho
69f4b6cb2e fix: sequentialDownload support in transmission-remote (#6454) 2023-12-29 13:25:55 -06:00
Charles Kerr
0ef34878de refactor: remove tr_str_is_empty() (#6432)
* refactor: do not u se tr_str_is_empty() in tr_torrentSetLocation()

* refactor: do not use tr_str_is_empty() in remote.cc

* refactor: do not use tr_str_is_empty() in subprocess-win32

* refactor: remove tr_str_is_empty()
2023-12-24 12:01:49 -06:00
Charles Kerr
07d96036d9 refactor: Values pt. 6 - remove deprecated API (#6250) 2023-11-14 17:23:51 -06:00
Charles Kerr
37f01fac4c refactor: migrate variant api (#6238) 2023-11-10 15:41:32 -06:00
Charles Kerr
2e32789193 refactor: add libtransmission::Values (#6215) 2023-11-09 08:39:06 -06:00
Charles Kerr
a952a0731f refactor: remove the tr_error** idiom (#6198)
* refactor: remove the tr_error** idiom

* fix: tr_error::message() is only constexpr in c++20 and up

* chore: silence a couple of g++-12 Wshadow warnings
2023-11-04 11:39:41 -05:00
Julien
8ac323d5d6 chore: removed copyright timespans in headers (#4850) 2023-11-01 16:11:11 -05:00
Charles Kerr
bbc3ce039f refactor: remove quark support from tr_variant (#6159) 2023-10-24 14:49:23 -04:00
Charles Kerr
32a62d85ea refactor: more tr_variant API (#6057) 2023-10-02 16:18:35 -05:00
Charles Kerr
fbfbfac3ae fix: minor coverity warnings (#5916)
* fix: unchecked return value from tr_variantDictFindInt()

coverity 1541113

* fix: unchecked return value from tr_variantDictFindBool()

coverity 1541112

* fix: copy-instead-of-move in tr_strlower()

coverity 1541092

* fix: use auto& instead of auto in test

coverity 1541084

* fix: logically dead code

coverity 1541065

* fix: copy-instead-of-move in tr_announcer_impl::addTorrent()

coverity 1541062

* fix: unchecked return value of tr_variantDictFindInt()

coverity 1541061

* fix: copy-instead-of-move in FilterBar::Impl::tracker_filter_model_update()

coverity 1541058

* fix: copy-instead-of-move in gtr_window_on_close()

* fix: silence invalid resource leak warning

coverity 1520595

* fix: unchecked return value from setsockopt()

coverity 1518345

* fix: dereference after null check (FORWARD_NULL)

coverity 1517816
2023-08-21 21:59:47 -05:00
Charles Kerr
59c638c63d refactor: replace tr_variant::is_*() with tr_variant::holds_alternative() (#5930) 2023-08-21 16:16:54 -05:00
Charles Kerr
5837603b6f refactor: make tr_variant follow RAII (#5923) 2023-08-20 23:15:23 -05:00
Charles Kerr
a4d205612a refactor: add tr_variant_serde (#5903) 2023-08-17 11:02:45 -05:00
tearfur
5ec4ca550e chore: iwyu (#5746) 2023-07-08 10:24:03 -05:00
lvd2
8b96e2616a transmission-remote: for '-l', implement default sorting by addedDate (#5608) 2023-07-07 14:56:49 -05:00
tearfur
2211086338 fix: conform to libcurl requirements to avoid memory leak (#5702) 2023-07-05 22:05:03 -05:00