Commit Graph

15513 Commits

Author SHA1 Message Date
Charles Kerr 0ef58c2a20
chore: improve lossless compression of png files (#5586) 2023-06-05 17:03:11 -05:00
Daniel Kamil Kozar c1c27f3da0
Expose files' begin and end pieces via RPC (#5578)
* Expose files' begin and end pieces via RPC

This adds two arguments, `beginPiece` and `endPiece`, for each of the entries
in the `files` array of the RPC's `torrent-`get` method.

The point is to allow RPC clients to display a file's completion progress as
piece-based in addition to byte-based.
2023-06-05 13:15:32 -05:00
Cœur 61679e1adc
Support localized punctuation for "Port:" (#4452)
* Support localized punctuation for "Port:"

* Code review: adopting "Port: %@"

* updating other locales for "Port" -> "Port: %@"
2023-05-29 09:43:43 -04:00
Cœur 87472672a6
build: fix xcode build (#5521) 2023-05-19 23:17:24 -05:00
Charles Kerr e171cbae9c
refactor: move Buffer::add_socket() to BufferWriter::add_socket() (#5543) 2023-05-19 23:06:26 -05:00
Charles Kerr ae888ef08e
perf: avoid map insertion for complete blocks received (#5540) 2023-05-19 18:36:07 -05:00
Charles Kerr 52b03c2489
refactor: migrate methods to buffer reader (#5533) 2023-05-18 16:56:29 -05:00
Charles Kerr 4fd5f3a490
refactor: use reserve_space() in peer-io (#5532) 2023-05-17 13:57:27 -05:00
Charles Kerr b9698210ef
refactor: restore part of Buffer::reserve_space() (#5529) 2023-05-16 21:46:41 -05:00
LaserEyess 84f32d89c8
build: only format JS if files in web/ change (#5525)
In many cases the webui code is not updated for core libtransmission
changes and changes in the utils/clients. Therefore, check to see if any
web changes are made before running npm linting.

Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
2023-05-14 18:53:34 -05:00
Charles Kerr 2cf9678737
fix: revert buffer reserve space (#5528)
* Revert "refactor: use BufferReader, BufferWriter as function args (#5518)"

This reverts commit c2d48a7d11.

* Revert "fixup! refactor: add BufferReader, BufferWriter::reserve_space() (#5513)"

This reverts commit b08e17beef.

* Revert "refactor: add BufferReader, BufferWriter::reserve_space() (#5513)"

This reverts commit 51fd7056ba.
2023-05-14 17:24:42 -05:00
Charles Kerr e88bf946e1
perf: avoid extra work in read_vc() (#5527) 2023-05-14 15:01:04 -05:00
Charles Kerr 8a1a6dba49
perf: avoid extra heap alloc in block cache (#5522) 2023-05-13 14:16:00 -05:00
Charles Kerr 69fc149f07
fix: avoid unintentional map insertions in ActiveRequests::count() (#5520) 2023-05-12 20:18:26 -05:00
Charles Kerr 7cabeff24f
perf: use std::bitset instead of tr_bitfield in incoming_piece_data (#5519)
Since max size is small and known at compile time, we can avoid extra heap allocations
2023-05-12 19:31:59 -05:00
Charles Kerr c2d48a7d11
refactor: use BufferReader, BufferWriter as function args (#5518) 2023-05-12 18:10:08 -05:00
Charles Kerr b08e17beef fixup! refactor: add BufferReader, BufferWriter::reserve_space() (#5513)
chore: remove tracer fmt::print() statements
2023-05-12 11:47:01 -05:00
Charles Kerr 51fd7056ba
refactor: add BufferReader, BufferWriter::reserve_space() (#5513) 2023-05-12 11:15:15 -05:00
Charles Kerr c61d8b7cf7
refactor: rename tr_tracker_view.host to .host_and_port for clarity (#5508) 2023-05-08 20:28:10 -05:00
Charles Kerr ea500ecdcd
fixup! feat: add global IP cache, fix UDP connection failure warnings (#5506) 2023-05-08 17:53:25 -05:00
Charles Kerr cb6358048d
fix: does not trash added torrent files when asked (#5505) 2023-05-08 16:21:54 -05:00
Will Thompson dd22b52bbf
GTK: Improve appstream metainfo (#5407)
* gtk: Add release history to metainfo file

This is mandatory on Flathub (and possibly other software repositories).
On each new release, a <release> element should be prepended to this
list.

Ideally each <release> would include (translatable) release notes, but
this is the bare minimum.

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases
https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Releases.html

* gtk: Add more URLs to AppStream metainfo

This covers all the URL types from the AppStream specification.

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-url

* gtk: Add translation info to AppStream metainfo

This allows information about per-language translation percentages to be
extracted at build-time and included in the repository's appstream file.
Software centres such as GNOME Software use this to indicate to the user
whether the app is translated into their language.

https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-translation
2023-05-07 13:02:49 -05:00
Charles Kerr 0d3b321bac
refactor: use snake_case for libtransmission class methods (#5497) 2023-05-05 23:11:05 -05:00
tearfur d65f9329cd
refactor: followup/cleanup of `tr_global_ip_cache` PR (#5498)
* remove tr_session::bindAddress()

* replace tr_net_hasIPv6 with tr_session::has_ip_protocol()

* update comment
2023-05-05 22:05:28 -05:00
kmikita 693d202a64
refactor: save stats.json periodically and when closing session #5476 (#5490) 2023-05-05 15:33:23 -05:00
Jonatan e407bcc501
docs: update translation site names (#5481)
See https://help.transifex.com/en/articles/7171815-web-application-s-domain-change
2023-05-05 13:51:18 -05:00
tearfur 474a30ab2d
feat: add global IP cache, fix UDP connection failure warnings 2023-05-05 12:17:40 -05:00
Charles Kerr bd8b50ef7b
fix: show magnet name in compact mode (#5491) 2023-05-04 15:24:19 -05:00
Gary Elshaw 2f1d5a225c
fix: comment typos in libtransmission (#5473) 2023-04-30 13:29:29 -05:00
github-actions[bot] 35fc9e7bbe
chore: update generated transmission-web files (#5478) 2023-04-29 14:32:19 -05:00
Gary Elshaw 52c45eb85f
fix: some typos in macos source code comments (#5475) 2023-04-29 14:00:35 -05:00
klevain 908e8a551e
feat: add high-contrast theme to web ui (#5470) 2023-04-29 11:26:37 -05:00
Safouane Aarab ccbb362fe5
refactor: edit style and increase spacing (#5466) 2023-04-29 10:36:21 -05:00
Gary Elshaw 2999e71e76
fix: typos in libtransmission tests (#5468) 2023-04-28 18:42:45 -05:00
Zhenfu Shi f34b1e624c
fix: wrong case in AppKit.h (#5456) 2023-04-27 13:39:52 -05:00
Mike Gelfand e8fcb025a0
fix: use user-preferred locale (#5444)
* Use user-preferred locale

Previous fix adding `L` format specifier was correct but only fixed half
of the problem, as C++ locale is set up to be "C" by default. GTK client
used to call `setlocale(LC_ALL, "")` to set up user-preferred locale
which only affected C functions and `std::locale` (used by libfmt) was
unaware of those changes.

Apply the fix to all the binaries since they're all doing some sort of
output to the user and calling libtransmission helpers, as well as using
libfmt directly.

* Improve libtransmission's json-test

Set the locale C++ way to avoid any sort of inconsistencies, and also
restore it to the old one once finished testing.

* Improve transmission-show test runner script

Quote outputs to avoid CMake error about `message()` being called with
no arguments. Capture stderr to the same output file. Fallback to `git
diff` if `diff` wasn't found. A few other minor changes.
2023-04-27 09:10:33 -05:00
github-actions[bot] c2002c9481
chore: update generated transmission-web files (#5463) 2023-04-27 00:07:55 -05:00
Charles Kerr 349a906f3b
fix: null tier name in inspector list (#5462) 2023-04-26 23:27:17 -05:00
Charles Kerr 15c3298211
ci: do not install homebrew libnatpmp on macos 11 (#5461) 2023-04-26 22:10:42 -05:00
Charles Kerr 47667bab8d
fix: bug that prevented providing the final metadata piece (#5460)
Fixes bug in implementation of BEP 9

Xref: https://www.bittorrent.org/beps/bep_0009.html
2023-04-26 19:40:49 -05:00
Charles Kerr 1b6b85989c
feat: add generic favicon_cache class for reuse between Qt, GTK app (#5294) 2023-04-22 21:11:16 -05:00
Charles Kerr 9d2507c7e3
refactor: snake_case in libtransmission class methods (#5428) 2023-04-22 20:25:55 -05:00
Charles Kerr 7e7d8137a0
fixup! feat: Add BufferWriter class (#5154) (#5437) 2023-04-22 18:13:39 -05:00
Charles Kerr 9f8a7a656e
fix: Buffer::Buffer(Buffer&&) bug (#5435) 2023-04-22 16:10:09 -05:00
Charles Kerr f9178eb084
fix: no such file or directory warning in transmission-cli (#5426) 2023-04-20 17:40:34 -05:00
Charles Kerr ce4ffc3bdb
fix: 5422 use-after-free in peerMsgs::canRead (#5425) 2023-04-20 13:18:53 -05:00
github-actions[bot] 1cb41d51ae
chore: update generated transmission-web files (#5408) 2023-04-19 21:16:44 -05:00
Charles Kerr 3044c14b10
perf: in Buffer::Iterator, defer evbuffer API calls (#5420) 2023-04-19 16:00:30 -05:00
Charles Kerr f2aa3e197b
refactor: add tr_sys_dir_get_files() (#5412) 2023-04-18 16:23:20 -05:00
Charles Kerr a8e01ac38d
fix: minor warnings (#5409)
* chore: fix readability-qualified-auto warnings

* chore: fix clang-analyzer-core.uninitialized.Branch warning

* fix: collision of key 'ERROR' in transmission-qt

* chore: silence -Wshadow warning

* chore: silence warning C4100: 'iter': unreferenced formal parameter

* chore: fix warning C4127: conditional expression is constant warning
2023-04-17 23:11:09 -05:00