Commit Graph

15912 Commits

Author SHA1 Message Date
github-actions[bot] 1c382cb97e
chore: update copyright years (#6470) 2024-01-03 21:33:30 -06:00
Yat Ho dce0d37130
fixup! fix: implement proper download limit for uTP (#6416) (#6481) 2024-01-03 11:27:11 -06:00
Charles Kerr 22cde5d4b9
refactor: use new tr_variant API in rpcimpl (#6456)
* refactor: tr_rpc_request_exec_json takes a std::function callback

* refactor: tr_rpc_request_exec_json callback takes a tr_variant&&

* refactor: use new tr_variant API in rpcimpl.cc

* refactor: tr_rpc_request_exec_json() now takes a const& to the request

* fixup! refactor: use new tr_variant API in rpcimpl.cc

* chore: rename function to tr_rpc_request_exec()

* chore: remove unused DetailsDialog::Impl::build_torrent_ids_variant_list()

* refactor: minor copyediting in rpcimpl.cc getTorrents()

* refactor: split handler methods between sync, async

* refactor: remove unused args_out param from AsyncHandlers

* chore: fix new readability-inconsistent-declaration-parameter-name warning
2024-01-02 22:14:43 -06:00
Yat Ho 10d047005a
refactor: convert `tr_incomplete_metadata` to c++ class (#6383)
* refactor: unset peer BEP-9 support if size hint is invalid

* fix: open torrent file in binary mode

* refactor: move metadata size check to method

* refactor: remove duplicate checks

* refactor: reduce temp variable scope in `parseLtepHandshake()`

* refactor: convert `get_piece_length()` to method

* refactor: convert `tr_torrentSetMetadataSizeHint()` to method

* refactor: convert `tr_torrentGetMetadataPiece()` to method

* refactor: convert `tr_torrentUseMetainfoFromFile()` to method

* refactor: convert `tr_torrentSetMetadataPiece()` to method

* refactor: convert `tr_torrentGetNextMetadataRequest()` to method

* refactor: convert `tr_torrentGetMetadataPercent()` to method

* refactor: add basic framework for MagnetMediator

* refactor: initialise `tr_incomplete_metadata` fields in constructor

* refactor: check metadata transfer completion in `set_metadata_piece()`

* refactor: convert `use_new_metainfo()` and `on_have_all_metainfo()` to methods

* refactor: move parts of `tr_torrent::set_metadata_piece()` into `tr_incomplete_metadata`

* refactor: move parts of `tr_torrent::get_next_metadata_request()` into `tr_incomplete_metadata`

* refactor: move parts of `tr_torrent::get_metadata_percent()` into `tr_incomplete_metadata`

* refactor: hide all `tr_incomplete_metadata` fields

* refactor: move `incomplete_metadata` to private

* feat: add test for `set_metadata_piece()`

* refactor: unify integer types

* refactor: rename `tr_incomplete_metadata` to `tr_metadata_download`

* chore: make clang-tidy happy

libtransmission/torrent-magnet.cc:117:68: warning: comparison of integers of different signs: 'long' and 'const uint64_t' (aka 'const unsigned long') [clang-diagnostic-sign-compare]

* refactor: pass log name to `tr_metadata_download` constructor

* chore: iwyu

* fix: thread-safe `TorrentMagnetTest.setMetadataPiece`

* chore: housekeeping

* Revert "fix: thread-safe `TorrentMagnetTest.setMetadataPiece`"

This reverts commit 2a7fcd93a262888f9f55d542b1a9a2da9ca72cea.

* fix: stop soon instead of stop now in `on_metainfo_completed()`

This is unreachable code now, but if it is ever reached, Transmission
will very likely crash.

* fix: maybe fix OpenBSD test failure
2024-01-02 21:04:17 -06:00
Yat Ho 5000edef01
fix: implement proper download limit for uTP (#6416)
* fix: return read buffer size in libutp read buffer size callback

* refactor: clamp amount of data processed in `can_read_wrapper()`

* chore: housekeeping

* refactor: call `utp_read_drained()` in on-read callback

so that uTP acks can be sent out in a more timely fashion
2024-01-02 00:33:53 -06:00
Charles Kerr 17a63b8026
chore: bump fmt to 10.2.0 (#6478) 2024-01-01 23:58:28 -06:00
Cœur 6647df9be6
feat: support multiple URL objects from pasteboard (#6467) 2024-01-01 22:35:57 -06:00
Cœur 376d806b2e
build: fix libtransmission build on very old cmake versions (#6418)
* Fix libtransmission build requirements

* code review: keeping compatibility with deprecated cmake
2024-01-01 21:58:22 -06:00
Yat Ho 61ed621f55
chore: webui scss cleanup (#6471)
* chore: rename some colours to more accurate names

* chore: sort colour definitions

* chore: housekeeping

* fix: remove invalid css properties
2024-01-01 17:22:18 -06:00
Mike Gelfand 6a84dbf560
Remove low-quality gettext locales from the list (#6475)
Only leave translations that are 90+% complete. This means the dropped
ones won't be installed, but (as with Qt client) will still be there in
the repo to avoid the need in adding them back if/when the time comes.
2024-01-01 22:19:31 +00:00
Yat Ho 964bd31a2b
fix: WebUI torrent title color when paused and highlighted in Light Mode (#6462) 2023-12-31 15:55:46 -06:00
Cœur f8f68067d7
perf: Don't poll every second for kevents (#6452)
* perf: Don't poll every second for kevents

* No need to alter properties in dealloc
2023-12-31 15:17:31 -06:00
Cœur e5e768e2ab
fix: implicit conversion loses integer precision (#6466) 2023-12-31 14:04:26 -06:00
Mike Gelfand 9c4d28dd08
fix: a couple of logging format issues (#6463)
* Fix swapped log args in `do_log_system_error()`

* Fix invalid fmt use in `tr_rpc_server::load()` logging
2023-12-30 08:56:34 -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
Yat Ho 3c635cd4e2
fix: exclude `(B/s)` from parameter names (#6448) 2023-12-29 13:22:21 -06:00
Mike Gelfand f544399183
Sync translations (#6453)
* Sync translations with code

* Move Qt client's it_IT to it

"it_IT" was merged into pre-existing "it", so no (huge) loss of translations
should occur; "it" was chosen as a base since it contains more up-to-date
translations while "it_IT" hasn't changed much in years (I think, because most
phrases were marked as reviewed and so impossible to change by most translators
based on their assigned role).

* Sync translations with Transifex

* Add new languages (90+% complete)

Mac client:
* Basque (eu)
* Hebrew (he)
* Hungarian (hu)
* Japanese (ja)
* Polish (pl)
* Portuguese (Brazil) (pt_BR)
* Swedish (sv)
* Ukrainian (uk)
* Chinese (China) (zh_CN)
* Chinese (Taiwan) (zh_TW)

Qt client:
* Icelandic (is)

Also, fix Qt client languages list to include those already in
translations/ subdirectory and 90+% complete:
* Hebrew (he)
* Chinese (Taiwan) (zh_TW)

* Fix Xcode language mapping for pt_PT/pt-PT

* Fix Xcode language mapping for pt_BR/pt-BR

* Fix Xcode language mapping for zh_CN/zh-CN

* Fix Xcode language mapping for zh_TW/zh-TW

* Sync translations with Transifex (again)

Primarily to fixup "Port: $@" translation, but there were other updates in the
meantime.

* Update list of QuickLookPlugin languages

* Fixup local pt-BR language name in tx config
2023-12-29 15:16:07 +00:00
qu1ck 427d813108
fix: support sequentialDownload in list of RPC torrent-get response keys (#6450) 2023-12-29 09:05:37 -06:00
Nick e80ec7b7a4
feat: add labels to DetailsDialog of Qt client 2023-12-25 16:09:20 -06:00
LaserEyess b562983cbd
Harden systemd service (#6391)
This commit includes strict, but still compatible, service hardening for
transmission-daemon.service. The main goal is a defense-in-depth
strategy that protects users from unknown vulnerabilities in
transmission.

In practice, transmission does not use any of the features that are
blocked in this hardening. However, this is still a network facing
daemon that, by design, accepts connections from unknown peers. So
better safe than sorry.

This commit also installs the service via CMake

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2023-12-24 20:48:18 -06:00
Charles Kerr 501487b8cf
refactor: remove tr_parse_result enum (#6435) 2023-12-24 18:05:18 -06:00
Winton Simonds 0780104b8d
docs: update Transmission-Resume-Files.md (#6367)
explain that the resume file format is benc.
2023-12-24 14:48:09 -06:00
Charles Kerr 69577ea4b9
fix: invalid TR_TORRENT_TRACKERS env var for some torrents (#6434) 2023-12-24 14:21:56 -06:00
Charles Kerr 5e51fda92e
refactor: remove tr_strlcpy() (#6433)
* refactor: do not use tr_strlcpy() in tr_strratio()

* refactor: do not use tr_strlcpy() in bindUnixSocket()

* refactor: do not use tr_strlcpy() in trackerView()

* chore: remove tr_strlcpy() unit tests

* chore: remove tr_strlcpy()

* chore: remove -DHAVE_STRLCPY from Xcode build

* fixup! refactor: do not use tr_strlcpy() in trackerView()

chore: fix copypaste bug
2023-12-24 13:33:33 -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 42b09b22df
refactor: reduce utils.h includes (#6431) 2023-12-24 11:02:54 -06:00
Yat Ho d2d7987553
refactor: allow explicitly queuing functions in session thread (#6406)
* feat: allow explicitly queuing functions in session thread

* refactor: rename `tr_session_thread`-related functions to snake_case
2023-12-24 08:32:14 -06:00
Yat Ho 9932f567fb
fix: update WebUI build instructions to use `dataurl` loader for images (#6430) 2023-12-24 07:53:57 -06:00
Yat Ho 45298e5a4e
fix: don't create all 0-byte files in `MakemetaTest::makeRandomFiles()` (#6394)
* fix: randomly failing `MakemetaTest.nameIsRootSingleFile`

* fix: eliminate remaining probability for `MakemetaTest.nameIsRootSingleFile` to fail
2023-12-23 14:49:19 -06:00
github-actions[bot] bfa5da9705
chore: update generated transmission-web files (#6427)
Co-authored-by: ckerr <ckerr@users.noreply.github.com>
2023-12-23 11:05:03 -06:00
Yat Ho a4e8cd5081
fix: esbuild load `svg` and `png` as `dataurl` type (#6409) 2023-12-23 10:32:38 -06:00
Charles Kerr 581d9c34cc
fix: gcc-13 warnings pt. 2 (#6404)
* fix: tr_priority_t usage warnings

* build: disable -Wnull-dereference warnings when building GTest

* fix: -Wunused-result warning in tr_spawn_async()

* fix: -Warray-bounds warning in NetTest::compact4()
2023-12-23 10:32:04 -06:00
LaserEyess a9fa9430ba
add user presets to .gitignore (#6407)
Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2023-12-23 10:22:01 -06:00
Yat Ho fe95914558
fix: use correct time to determine write buffer size (#6414) 2023-12-23 09:28:43 -06:00
Yat Ho 7c9e04d035
fix: mark torrent as changed when stopping (#6405) 2023-12-17 23:29:53 -06:00
Charles Kerr 2dea0b5fa2
fix: gcc 13 warnings, pt. 1 (#6400)
* fix: nullptr dereference warnings

* fix: mixed enumerated and non-enumerated warning

* fix: -Wnull-dereference warning in qt/MainWindow.cc

* fix: -Wnull-dereference warning in TorrentFilter::countTorrentsPerMode()

* fix: -Wnull-dereference warning in VariantHelpers::change(TrackerStat&, tr_variant*)

* build: bump google-test from 1.12.1 to 1.14.0

* Revert "build: bump google-test from 1.12.1 to 1.14.0"

This reverts commit 6fdcffa5de.
2023-12-17 12:49:39 -06:00
Yat Ho 8177c883b0
fix: allow stopping torrent during verify again (#6398) 2023-12-17 11:16:48 -06:00
Will Thompson efcfc7d374
build: add 4.0.4, 4.0.5 releases to metainfo (#6378) 2023-12-17 10:33:30 -06:00
Yat Ho 714411a984
fix: disable RapidJSON SIMD optimisations (#6395)
The minuscule speed increase is not worth the potential bugs and compatibility problems
2023-12-17 09:38:17 -06:00
Mike Gelfand a494da4fea
fix: fill random buffer in chunks with mbedtls crypto backend (#6379)
* adjust crypto unit test to reproduce the issue

* fill random buffer in chunks with mbedtls crypto backend
2023-12-16 19:21:24 -06:00
Federico Scodelaro 33c4cd1c44
feat(qt): Add ETA to compact view (#3926)
* feat(qt): Add ETA to compcat view

* style: Apply codestyle guides

* fix: Remove whitespaces from translatable string

* chore: fix FTBFS from 76521a1 code shear

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2023-12-16 10:32:07 -06:00
Mingye Wang e951ed2508
Use screen.visibleFrame instead of screen.frame (#6321)
* Use screen.visibleFrame instead of screen.frame

NSScreen.frame does not account for the dock, which can be at the bottom or any of the sides. As a result, layout errors that smash things into the dock can occur in the Y or X direction. visibleFrame accounts for the dock.

Should fix #4779. Untested.

* Update TorrentTableView.mm

* Remove -= 50 in max height calculation
2023-12-16 09:22:06 -06:00
Yat Ho 4b882b1bad
fix: sometimes stuck magnet metadata transfer (#6364)
* fix: don't check `total_size` against `metadata_size_hint`

* refactor: remove `metadata_size_hint`

* refactor: restart metadata transfer from scratch on failing
2023-12-16 08:47:55 -06:00
Yat Ho 7f2e165c1e
fix: remove unnecessary locking in global ip cache (#6370) 2023-12-16 08:03:33 -06:00
Charles Kerr 4037726150
chore: bump fmt to 10.1.1 (#6358) 2023-12-08 11:20:04 -06:00
Yat Ho 7fa318c283
fix: mark torrent as changed when setting location (#6355) 2023-12-08 09:38:57 -06:00
Yat Ho 4506d20136
fix: add check for `EWOULDBLOCK` (#6350) 2023-12-07 10:13:34 -06:00
Charles Kerr 15af2ff5be
refactor: show 1.0 progress for zero-byte files (#6307) 2023-12-06 11:23:47 -06:00
Yat Ho 48f9a2376a
fix: always use location of selected torrents in WebUI set location dialogue (#6337) 2023-12-06 10:10:28 -06:00