Add d.tracker_domain command from rtorrent-ps #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As the jesec/rtorrent docker image doesn't contain functionality needed to move files for security reasons, one of the few ways of sorting files when running with lots of torrents (10k+ in this case) is to set the download directory to be derived from the tracker.
I have lifted (with a few minor changes to match C++ styling) the code from https://github.com/pyroscope/rtorrent-ps/blob/e5d95e1acd2698175540ae9d9dde3b33c96be9ea/patches/command_pyroscope.cc#L180, to add the d.tracker_domain command into the codebase, to allow downloads to go directly to their final sorted path.
This can be controlled by adding this to the rtorrent.rc file (where
cfg.download
is set to the base download directory), which is also responsible for creating the new directory if it doesn't exist, even without havingmkdir
inside the container (tested in a custom jesec/rtorrent container compiled with the proposed changes here):This change is similar to adding the rtorrent-ps
strings.contains
command proposed in this PR.