mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 15:19:20 +00:00
Rename d.get_data_full_path command to d.data_path on Common Tasks page
+12
-12
@@ -16,7 +16,7 @@ From 0.9.2, ``d.base_path`` attribute can be empty sometimes (e.g. when a downlo
|
||||
.. code-block::
|
||||
|
||||
# gets the full path of data of a torrent (it's a workaround for the possibly empty 'd.base_path' attribute)
|
||||
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
|
||||
|
||||
Saving torrent state and resume data between sessions
|
||||
@@ -61,23 +61,23 @@ Create symbolic links to indicate the download state
|
||||
Move completed torrents to a fixed location
|
||||
------------
|
||||
|
||||
When the torrent finishes, it executes ``mv <base_path> ~/Download/`` and then sets the destination directory to ``~/Download/`` (using the included ``d.get_data_full_path`` method).
|
||||
When the torrent finishes, it executes ``mv <base_path> ~/Download/`` and then sets the destination directory to ``~/Download/`` (using the included ``d.data_path`` method).
|
||||
|
||||
.. code-block::
|
||||
|
||||
method.insert = d.get_finished_dir, simple, "cat=~/Download/,$d.custom1="
|
||||
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.move_to_complete, simple, "d.directory.set=$argument.1=; execute=mkdir,-p,$argument.1=; execute=mv,-u,$argument.0=,$argument.1=; d.save_full_session="
|
||||
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.get_data_full_path=,$d.get_finished_dir="
|
||||
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.get_finished_dir="
|
||||
|
||||
If you need to move torrent data across disks/partitions on completion then you may find this version helpful to avoid hash check failures
|
||||
|
||||
.. code-block::
|
||||
|
||||
method.insert = d.get_finished_dir, simple, "cat=~/Download/,$d.custom1="
|
||||
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.move_to_complete, simple, "execute=mkdir,-p,$argument.1=; execute=cp,-rp,$argument.0=,$argument.1=; d.stop=; d.directory.set=$argument.1=; d.start=;d.save_full_session=; execute=rm, -r, $argument.0="
|
||||
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.get_data_full_path=,$d.get_finished_dir="
|
||||
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.get_finished_dir="
|
||||
|
||||
|
||||
Move completed torrents to a dynamic location
|
||||
@@ -104,16 +104,16 @@ See `Versatile Move on Completion`_ for all the details, including how to instal
|
||||
Move completed torrents to different directory depending on watch directory
|
||||
------------
|
||||
|
||||
Each watch directory adds torrents with the final destination stored in the ``custom1`` string of the download. You can check this string with ``^x`` then ``print=$d.custom1=`` in the client (using the above defined ``d.get_data_full_path`` method).
|
||||
Each watch directory adds torrents with the final destination stored in the ``custom1`` string of the download. You can check this string with ``^x`` then ``print=$d.custom1=`` in the client (using the above defined ``d.data_path`` method).
|
||||
|
||||
.. code-block::
|
||||
|
||||
schedule2 = watch_directory_1,10,10,"load.start=~/Download/watch_stuff1/*.torrent,d.custom1.set=~/Download/stuff1/"
|
||||
schedule2 = watch_directory_2,10,10,"load.start=~/Download/watch_stuff2/*.torrent,d.custom1.set=~/Download/stuff2/"
|
||||
|
||||
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.move_to_complete, simple, "d.directory.set=$argument.1=; execute=mkdir,-p,$argument.1=; execute=mv,-u,$argument.0=,$argument.1=; d.save_full_session="
|
||||
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.get_data_full_path=,$d.custom1="
|
||||
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.custom1="
|
||||
|
||||
|
||||
Delayed Completion Handling
|
||||
@@ -163,7 +163,7 @@ See `Ratio Handling <https://github.com/rakshasa/rtorrent/wiki/RTorrentRatioHand
|
||||
Delete data files when removing incomplete downloads
|
||||
------------
|
||||
|
||||
If you often add older torrents and find that they never complete due to lack of seeds, these commands will automatically delete the data files when removing an incomplete download (either manually or with remove_untied by removing the tied file) (using the above defined ``d.get_data_full_path`` method). Note that all files will be removed on incomplete or partially complete downloads, even those files from it which are in fact completely downloaded.
|
||||
If you often add older torrents and find that they never complete due to lack of seeds, these commands will automatically delete the data files when removing an incomplete download (either manually or with remove_untied by removing the tied file) (using the above defined ``d.data_path`` method). Note that all files will be removed on incomplete or partially complete downloads, even those files from it which are in fact completely downloaded.
|
||||
|
||||
**WARNING:** Do **NOT** use this setup if you ever change a download's base_path to something like /home/bob/ or similar, or you could lose a lot of files!
|
||||
|
||||
@@ -176,9 +176,9 @@ If you often add older torrents and find that they never complete due to lack of
|
||||
method.set_key = event.download.finished,set_done_var,d.custom2.set=
|
||||
|
||||
# gets the full path of data of a torrent (it's a workaround for the possibly empty 'd.base_path' attribute)
|
||||
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
# Erase data files when a download is removed that still has 'custom2' set.
|
||||
method.set_key = event.download.erased,rm_files,"branch=d.custom2=,\"execute={rm,-rf,--,$d.get_data_full_path=}\""
|
||||
method.set_key = event.download.erased,rm_files,"branch=d.custom2=,\"execute={rm,-rf,--,$d.data_path=}\""
|
||||
|
||||
To make an incomplete download exempt from the automated deletion on removal, select the download then press Ctrl-X and enter ``d.custom2.set=``.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user