* refactor: remove unused field tr_torrent.prefetchMagnetMetadata
* refactor: remove unused field tr_torrent.dhtAnnounce6InProgress
* refactor: remove unused field tr_torrent.dhtAnnounceInProgress
* refactor: fold etaULSpeed and etaDLSpeed into one field
* refactor: re-arrange fields to avoid padding
Most use cases involve either (a) using the default group or (b) sharing
a group with other torrents. In both cases, using a tr_quark is cheaper
than a std::string.
* refactor: re-enable cert-err33-c clang-tidy warning
* refactor: use fmt::chrono in transmission-remote
* refactor: use fmt::chrono in transmission-show
* refactor: use fmt::chrono in GTK details dialog
* refactor: use fmt::chrono in tr_session
* refactor: remove tr_localtime_r
* refactor: remove tr_gmtime_r
* refactor: implement FileTreeItem::children_ with a std::vector
* fix: std::move should not be called on forwarding reference
* fix: uninitialized scalar variable
* fix: unchecked return value from library
* fix: dereference before null check
* fix: unchecked return value from library
* fix: unchecked return value from library
* fixup! refactor: implement FileTreeItem::children_ with a std::vector
* fix: signed-unsigned comparison in libtransmission tests
* fix: avoid unnecessary copy by using const reference
* fix: function should be declared const
* refactor: use fmt::format to build log timestamps
* fix: use init-statement to reduce variable scope
* fixup! refactor: use fmt::format to build log timestamps
* fix: remove tau_tracker destructor for rule-of-zero
* fix: remove tr_peerIo destructor for rule-of-zero
* Revert "fix: dereference before null check"
This reverts commit cd78967815.
* fix: signed-unsigned comparison in libtransmission tests
* fix: use init-statement to reduce variable scope
* fix: extract nested code block into separate method
* fix: extract nested code block into separate method
* fix: extract nested code block into separate method
* fix: use init-statement to reduce variable scope
* fix: extract nested code block into separate method
* fix: signed-unsigned comparison in libtransmission tests
* fixup! fix: extract nested code block into separate method
* fix: mark possibly-unused as [[maybe_unused]]
* fix: invalid stack memory reference in tr_found_file_t
* fix: signed-unsigned comparison in libtransmission tests
* refactor: tr_ctorSaveContents takes a string_view filename
* refactor: remove tr_ctorSaveMagnetContents
* refactor: announce_list::save takes a std::string_view
* refactor: magnet() takes an OutputIt arg
Generate the magnet link URL into an output iterator
* refactor: remove deprecated calls to tr_http_escape
* refactor: tr_torrent.torrentFile takes an OutputIterator
* refactor: tr_torrent.torrentFile returns a tr_pathbuf
* refactor: tr_torrent_metainfo.makeFilename returns a tr_pathbuf
* refactor: use tr_urlbuf in announcer-http
* fix: break will never be executed
* refactor: compile the name fallback string
* fix: replace redundant type with auto
* fix: use init-statement to reduce variable scope
* fix: implicit conversion loses precision
* fix: use in-class initializer
* fix: make variable a pointer-to-const
* fix: local variable name shadows class variable
* fix: implicit conversion may lose precision
* refactor: reduce nested conditional webseed logic
* refactor: use tr_block_info::Location in webseed
* request larger chunks at a time from webseeds
* fix: CURLOPT_MAXREDIRS to safeguard against loops
Discussion at https://trac.transmissionbt.com/ticket/6110 .
Reported by @x190 and @cfpp2p a few years back.
Add a getter/setter for torrent announce URLs as text that can be copied
and pasted: one URL per line, with a blank line between tiers.
C API: tr_torrentGetTrackerList() and tr_torrentSetTrackerList()
RPC APi: `trackerList` in `torrent-get` and `torrent-set`.
This deprecates `trackerAdd`, `trackerRemove`, and `trackerEdit`
from the RPC API.
* feat: newly-added seeds skip the full verify step
This has been a much-requested feature but has also been contentious
because I want to ensure that Transmission never transmits unverified
data. See the GH pull request for context on how this works.
Fixes#1082. The use case is a torrent-done script that needs to know
if a torrent is done because it finished downloading or if it's done
because it's a newly-added seed.
* refactor: prefer constexpr over enum for GUI_PAD values
* refactor: prefer constexpr over enum for PrefsDialog values
* refactor: prefer constexpr over enum for StatsDialog values
* refactor: use enum class for GtrUnicode types
* refactor: prefer constexpr over enum for BT peer msg codes
* refactor: use enum class for TrMakemetaResult
* refactor: prefer constexpr over enum for BT metadata message types
* refactor: use enum class for AwaitingBt
* refactor: use enum class for EncryptionPreference
* refactor: use enum class for TrFormat in rpcimpl
* refactor: prefer constexpr over enum for QApp intervals
* refactor: prefer constexpr over enum for tr_resume bitfields
* refactor: prefer constexpr over enum for Qt/TrFileModel bitfields
* refactor: remove obsolete TODO comment in announce-list
This commit adds labels to the torrent-add method, allowing RPC users to
specify labels when adding a torrent. Labels metadata is commonly known
when adding torrents, so this removes the need to send another
torrent-set call to add labels.
Additionally, transmission-remote is updated to handle labels in
torrent-add.
Co-authored-by: LaserEyess <LaserEyess@users.noreply.github.com>
This prevents accidentally following a symlink that points outside of
the torrent's folder and crawling the rest of the drive for junk files
to remove.
This also prevents symlinks that point to a folder from being treated as
real directories, which would cause them to be removed even if the folder
they point to is not actually empty.
Fixes#2430.
When removing a torrent, try to remove config filenames under both old
and new filename formats. This prevents torrents from being incorrectly
re-added when old-format files aren't removed.
Previously was calculated by number of bytes downloaded, which caused
edge cases when those two numbers were not the same, e.g. if the user
already had part of the torrent from another source and only downloaded
a small part. When this happened, the ratio could be very large and use
of seedratio would behave in a way that most people would not expect.
Note, the old behavior has been around for a VERY LONG TIME. Even though
this is a bugfix, it does change semantics. I don't think there is any
third-party code that depends on the old behavior but this is arguably
a breaking change.
* refactor: include <memory> when using shared_ptr or unique_ptr
* refactor: include <cstdio> iff we use it
* refactor: include <cstring> iff we use it
* refactor: include <cstdlib> iff we use it
* refactor: include <string_view> or <string> iff we use it
* refactor: include <array> iff we use it
* refactor: include <ctime> iff we use it
* refactor: include <cctype> iff we use it
* refactor: misc #include cleanups in libtransmission
* refactor: add tr_torrent_metainfo class
Can be used for parsing bencoded .torrent data without instantiating
a tr_torrent. This will be used in all the places where client code
needs to test a .torrent file for validity / to add a preview window
before adding the torrent.