1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-22 07:42:37 +00:00
Commit graph

16194 commits

Author SHA1 Message Date
Yat Ho
90859fe115
test: use new tr_variant API (#7268)
* test: new `tr_variant` API in `json-test.cc`

* test: new `tr_variant` API in `variant-test.cc`

* chore: housekeeping

* test: new `tr_variant` API in `dht-test.cc`

* fix: use `reinterpret_cast` in `tr_variant::make_raw()`

* fix: add missing `typename` in `tr_variant::make_raw()`

* test: new `tr_variant` API in `settings-test.cc`

* test: new `tr_variant` API in `move-test.cc`

* test: new `tr_variant` API in `rpc-test.cc`

* test: new `tr_variant` API in `makemeta-test.cc`

* test: new `tr_variant` API in `session-test.cc`
2024-12-09 19:22:54 -06:00
Yat Ho
510286f419
ci: remove macos pkgconf workaround (#7273)
Xref: 1074c30e60
2024-12-09 16:32:14 -06:00
Yat Ho
60e5d98dc1
fix: handle nullptr in json serde (#7258)
* fix: handle nullptr in json serde

* test: fuzz json serde
2024-12-09 11:59:10 -06:00
Yat Ho
affb03a8d2
refactor: remove tr_torrent::do_magnet_idle_work() (#7271)
* Revert "fix: possible heap-use-after-free with magnet links (#6815)"

This reverts commit 09b67c84b1.

* fix: check if torrent still exists before verifying

* refactor: queue `on_have_all_metainfo()` in session thread instead
2024-12-09 10:58:39 -06:00
Cœur
43f5ca8e0c
CI: updrading deprecated macOS 12 to macOS 13 (#7275) 2024-12-08 22:57:18 -06:00
Rukario
100e88826c
fix: utilize gigabyte per second to conserve space and upload arrow clipping fix (#7279)
* Update transmission-app.scss

* Update formatter.js

* Update formatter.js
2024-12-08 21:44:18 -06:00
Josh Grosse
1bcc951001
chore: add 4.0.5 and 4.0.6 release notes to main branch (#7282)
* docs: 4.0.5 release notes (#6346)

* docs: add 4.0.6 release notes

* update: 4.0.4 -> 4.0.6 for release build example

---------

Co-authored-by: Charles Kerr <charles@charleskerr.com>
2024-12-08 21:43:52 -06:00
Yat Ho
002c891216
refactor: use string_view literals instead of C string literals (#7266) 2024-11-26 19:52:05 -06:00
Yat Ho
27955a9c8a
fix: CI errors related to REBUILD_WEB (#7252)
* ci: bump debian image from 11 to 12

debian 11 has npm 7.5.2, which is lower than our minimum required version 8.0.307.

* build: find `npm.cmd` on Windows

* chore: trigger CI

* Revert "chore: trigger CI"

This reverts commit adc8f4ec98.

* Revert "ci: bump debian image from 11 to 12"

This reverts commit 4730d350b3.

* ci: use `actions/setup-node` in debian 11

* ci: don't test `REBUILD_WEB` if only `libtransmission` changed

* ci: don't test `REBUILD_WEB` if only `third-party` changed
2024-11-24 19:51:13 -06:00
Cœur
1074c30e60
fix: macOS CI (#7254)
* fix macOS CI

* adding `--formulae`
2024-11-21 13:34:34 -06:00
Yat Ho
836e020853
ci: test REBUILD_WEB=ON (#7242) 2024-11-18 11:15:07 -06:00
Rukario
a1befba4d8
Update torrent-row.js (#7245) 2024-11-18 09:30:21 -06:00
Yat Ho
384b265033
chore: bump libutp (#7250) 2024-11-17 20:37:34 -06:00
Charles Kerr
d1a1a0adae
fix: clang-tidy header warnings, pt. 1 (#7228)
* fix: warning: deleted member function should be public [modernize-use-equals-delete]

* fix: warning: variable has inline specifier but is implicitly inlined [readability-redundant-inline-specifier]

* fix: warning: enum uses a larger base type than necessary for its value set [performance-enum-size]

* fix: warning: initializer for member is redundant [readability-redundant-member-init]

* warning: parameter is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls]
2024-11-17 20:04:55 -06:00
Rukario
e45fbade2e
feat: more gray for grayed out objects 2024-11-17 17:33:16 -06:00
Yat Ho
7e4b4f10a1
refactor: faster wishlist (#7027)
* chore: housekeeping

* perf: short circuit peer has block check

* refactor: track active requests in each respective peer

* refactor: swap `ActiveRequests` with new request tracking method

* refactor: use bitfield to store active requests per peer

* perf: check active request numbers first

* refactor: initialise candidate values in constructor

* refactor: better naming

* refactor: use `find_by_block()` more

* refactor: store wishlist mediator in swarm object

* test: make it compile

* test: update endgame test

* test: new test for choke event

* test: remove redundant lines

* test: new test for request event

* test: new test for reject event

* refactor: cache block have state in wishlist

* test: fix `gotBlockResortsPiece`

* fixup! refactor: track active requests in each respective peer

* fixup! test: fix `gotBlockResortsPiece`

* fix: count webseeds when calculating active requests

* build: update xcode project

* fix: add missing `candidates_dirty_` checks

* chore: remove old `depends-on` comments

* fixup! refactor: use bitfield to store active requests per peer

* refactor: extract block peer event to separate function

* perf: reorder conditions by overhead

* perf: check for completed block instead of completed piece

* chore: remove duplicated "unrequested piece" check

* refactor: merge similar block size sanity check

* refactor: use map to store number of requests in wishlist

* refactor: add asserts

* refactor: flush write buffer as soon as there is new data

* refactor: more accurate function naming

* fix: account for corrupt pieces in wishlist

* fix: account for unaligned blocks in wishlist

* Revert "fix: account for unaligned blocks in wishlist"

This reverts commit c3fce93cbae49c11d62e26caccedf55c1987aa95.

* fixup! refactor: use map to store number of requests in wishlist

* fix: account for unaligned blocks in wishlist v2

* chore: add `[[nodiscard]]`

* fixup! fix: account for unaligned blocks in wishlist v2

* fix: crash when handshake finishes in the middle of function
2024-11-11 19:30:00 -06:00
Robin Seth Ekman
198ee5bd97
build: update web/CMakeLists.txt to reflect renamed files (Fixes: #7240) (#7241)
the files web/prettier.config.js and web/stylelint.config.js were renamed in b9f4509, but web/CMakeLists.txt was not updated correspondingly.
hence, using `REBUILD_WEB` would cause FTFS.
2024-11-11 00:29:25 -06:00
Yat Ho
5a881191d0
fix: allow unreachable peers to be retried (#6975)
`tr_peer_info::reconnect_interval_has_passed()` contains logic to increase the reconnect interval for unreachable peers, but it has no effect at all currently because they wouldn't be tried in the first place.
2024-11-08 12:44:27 -06:00
Yat Ho
49f4c604da
fix: don't increment failure count when stopping torrent (#7238)
* fix: don't increment failure count when stopping torrent

* refactor: don't reset failure count on torrent stop
2024-11-08 12:42:59 -06:00
Yat Ho
6bf62959b4
refactor: set CURLOPT_MAXREDIRS once (#7233) 2024-11-06 14:36:34 -06:00
Yat Ho
f1102f0b4d
fix: don't double count webseed download data rate (#7235)
Regression from f1a53840f9
2024-11-06 13:55:58 -06:00
Yat Ho
2315903015
build: accept false constant other than OFF for REBUILD_WEB (#7219) 2024-11-03 16:50:04 -06:00
Cœur
c97527b555
Crash fix: "Invalid parameter not satisfying: aString != nil" (#7226) 2024-11-03 16:48:19 -06:00
Dzmitry Neviadomski
73f9600326
fix: support dark mode colors with pieces bar on macOS (#6959)
Signed-off-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-11-02 20:04:42 -05:00
Yat Ho
7978120c41
fix: save resume when shutting down (#7216)
Regression from 24bb159bfe
Xref: https://trac.transmissionbt.com/ticket/2317
2024-11-02 16:08:00 -05:00
Yat Ho
361b5c6152
fix: support nodejs below v20.11 for generate_buildonly.js (#7214) 2024-10-31 22:15:05 -05:00
Yat Ho
2c82f3d83d
fix: add missing settings.json docs and app defaults (#7218)
* docs: `trash-can-enabled` gtk only

* fix: add `pidfile` to daemon app defaults

* perf: don't copy string literal to variant
2024-10-31 22:14:44 -05:00
Yat Ho
1f36458e10
build: fail if clang-tidy is not found when -DRUN_CLANG_TIDY=ON (#7210) 2024-10-30 13:29:38 -05:00
Yat Ho
f0e7c3ed74
chore: convert transmission-web to ES module (#7209) 2024-10-30 10:48:38 -05:00
Rukario
dce515f37c
feat: display percent in progress bar for web client (#5937)
* Update transmission-app.scss

* Update torrent-row.js

* Update transmission-app.scss

* Update transmission-app.scss

* Update transmission-app.scss

* Update transmission-app.scss

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

* Update file-row.js

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

* Update formatter.js

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

* Update inspector.js

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

* Update torrent-row.js

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

* Update torrent.js

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

* Update transmission-app.scss

* Update transmission-app.scss

---------

Co-authored-by: Yat Ho <lagoho7@gmail.com>
2024-10-30 09:19:01 -05:00
Charles Kerr
f988da6aa1
refactor: remove unused TR_SYS_FILE_APPEND (#7206) 2024-10-29 17:07:13 -05:00
Charles Kerr
c1047b8009
refactor: remove unused TR_SYS_FILE_LOCK_UN (#7207) 2024-10-29 00:14:53 -05:00
Yat Ho
c36a62e171
ci: automatically regenerate package.json.buildonly (#7198) 2024-10-28 15:45:29 -05:00
Yat Ho
d5d950e1cf
fix: always sort peer candidates by score (#7199) 2024-10-27 19:54:09 -05:00
Yat Ho
13987e7996
refactor: warn peer incompliant behaviour in ltep (#7203)
* refactor: add log warning for ut metadata in private torrent

* refactor: add log warning for ut pex in private torrent

* refactor: add log warning for ltep handshake without advertised support

* refactor: unify ltep handshake log format

* refactor: removed redundant ltep logs

* refactor: add back log for ut pex
2024-10-27 19:38:56 -05:00
Yat Ho
5cc0934ddb
fix: clear tracker error if tracker is removed (#7141) 2024-10-24 21:45:43 -05:00
Yat Ho
3ec271fe5a
fix: count webseeds when calculating piece replication (#7028) 2024-10-23 20:49:01 -05:00
Charles Kerr
d8adecbfb5
fix: clang-tidy-20 warnings in transmission-qt (#7192)
* fix: modernize-min-max-use-initializer-list warning

* fix: readability-container-contains warning

* fix: readability-avoid-return-with-void-value warning

* fix: readability-math-missing-parentheses warnings

* chore: clang-format

* fixup! fix: readability-math-missing-parentheses warnings

* fix: bugprone-suspicious-stringview-data-usage warning
2024-10-23 20:48:01 -05:00
Cœur
9513cdaebb
feat: clear the badge when quitting app (#7088) 2024-10-22 09:34:55 -05:00
Cœur
4e25c038a6
mac os autosize dock fix (#7188)
* macOS autosize dock fix

* Fix: Move variable declaration inside block to minimize scope length

* Fix: Move comment to its own line for better readability

* Fix: Use dot syntax for accessing scrollViewHeight property in calculateScrollViewHeightWithDockAdjustment method

* Fix: Add CGFloat type declaration for height variable

* rollback alignment change for clang-format

---------

Co-authored-by: emeritaacuity0u <emerita.acuity_0u@icloud.com>
2024-10-22 09:33:28 -05:00
Charles Kerr
19543ba65f
fix: clang-tidy-20 warnings (#7187)
* fix: readability-math-missing-parentheses clang-tidy warnings

* chore: remove unused function tr_ctorGetSession()

* chore: remove unused function tr_ctorGetIncompleteDir()

* chore: make generatePublicKey() a lambda

* fix: readability-container-contains warnings

* fix: misc-use-internal-linkage warnings

* chore: inline generate_public_key() since it was only used once
2024-10-21 20:57:01 -05:00
Julia
97abf15050
correct "Queue for download" last activity (#6872)
* simple fix

* apply suggestion
2024-10-21 20:56:37 -05:00
Bheesham Persaud
614244bfae
fix(web): pressing the enter key now submits dialogs (#7036)
Dialogs by themselves aren't submitted when pressing the Enter key,
for that we need to add an event handler to the dialog itself.

One approach I tried was to add a form to the dialog. This worked, but
needed a CSS workaround to keep the buttons in the same order.

Tested with some other dialogs as well:

* edit labels; and
* set location.

References:

* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog#handling_the_return_value_from_the_dialog
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#formmethod
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#method

Fixes #6553
2024-10-21 19:13:42 -05:00
Yat Ho
89a88c6603
fix: date done and recently-active not updated on state change (#6992)
* fix: update `date_done_` as long as the torrent is done

* fix: `mark_change()` should be called as long as torrent state changes

* chore: remove redundant completeness update in `tr_torrent::start_in_session_thread()`

* fix: log whenever torrent state changes

* chore: add comment to explain `recent_change`

* chore: housekeeping

* fix: recover torrents with missing date done
2024-10-21 19:07:49 -05:00
Yat Ho
ab66f73c74
fix: properly reconnect on handshake error (#6950)
* fix: clear read buffer when closing connection

* fix: clear write buffer when closing connection

* fix: disable encryption when reconnecting

* refactor: dedupe code

* fix: maybe reconnect using MSE handshake if it was an utp failure

* chore: misc housekeeping

* chore: removed `tr_peerIo::utp_supported_`

* refactor: more logs in `tr_handshake::on_error()`
2024-10-21 17:45:58 -05:00
Yat Ho
b5cc6916ef
fix: don't retry plain handshake in AwaitingVc state (#6969) 2024-10-21 16:31:11 -05:00
Yat Ho
819d7f4136
fix: check tr_num_parse result in daemon (#7181) 2024-10-20 23:52:52 -05:00
Cœur
a8bf44eeb1
fix: code should be clang-formatted (#7184) 2024-10-20 20:37:06 -05:00
Cœur
64cf3a236a
ci: fix macos-12-x86_64-from-tarball from GitHub workflows (#7169) 2024-10-20 11:44:43 -05:00
Yat Ho
f37b8d9bf5
fixup! fix: update partial file suffix after verifying torrent (#6871) (#7072) 2024-10-14 07:43:18 -05:00