mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-08 07:09:21 +00:00
Replace branch command with if in d.data_path command definitions on Common Tasks page
@@ -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.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))"
|
||||
|
||||
|
||||
Saving torrent state and resume data between sessions
|
||||
@@ -66,7 +66,7 @@ When the torrent finishes, it executes ``mv <base_path> ~/Download/`` and then s
|
||||
.. code-block::
|
||||
|
||||
method.insert = d.get_finished_dir, simple, "cat=~/Download/,$d.custom1="
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "if=(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.data_path=,$d.get_finished_dir="
|
||||
|
||||
@@ -75,7 +75,7 @@ If you need to move torrent data across disks/partitions on completion then you
|
||||
.. code-block::
|
||||
|
||||
method.insert = d.get_finished_dir, simple, "cat=~/Download/,$d.custom1="
|
||||
method.insert = d.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "if=(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.data_path=,$d.get_finished_dir="
|
||||
|
||||
@@ -111,7 +111,7 @@ Each watch directory adds torrents with the final destination stored in the ``cu
|
||||
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.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "if=(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.data_path=,$d.custom1="
|
||||
|
||||
@@ -176,7 +176,7 @@ 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.data_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
|
||||
method.insert = d.data_path, simple, "if=(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.data_path=}\""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user