[Linux] rtorrent amc supplemental guide
Posted: 23 May 2018, 20:18
I recently made the journey from Windows with Qbittorent to an Ubuntu 16.04 server NAS with Rtorrent 0.9.6. After doing the Initial setup and configuration of rtorrent, filebot, and the amc post-process script I realized that Rtorrent defaults to saving torrent data to the same directory as torrents that are still downloading. The problem with that is amc processes and excludes files/folders that aren't ready if you happen to be downloading multiple torrents.
The proper setup is as follows:
in .rtorrent.rc change the default directory to
Create the above directory and if it's not in the rtorrent home directory then assign permissions to it.
personally I'm using /media/d5/downloading
Next, you need to insert the following into .rtorrent.rc
Make sure to change "cat=~/Download/,$d.custom1=" to where you actually intend to move data to after it is finished downloading
I'm using "cat=/media/d5/downloads/,$d.custom1="
taken from: https://github.com/rakshasa/rtorrent/wi ... d-location
Lastly I discovered that rtorrent was running the postprocess first and then moving the completed download to its proper resting place which results in a never-ending cycle of the last torrent not getting processed until a new torrent is downloaded. After chatting with the fine folks in #rtorrent on Freenode they told me that, "A multi command is an array of simple commands, indexed by a name. When you call a multi-command, the sequence is executed in order of the keys used when defining a single command of the sequence." -Pyroscope
In this case you likely have the following 2 keys in .rtorrent.rc
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.get_finished_dir="
method.set_key = event.download.finished,filebot,"execute={/home/user/rtorrent-postprocess.sh,$d.base_path=,$d.name=,$d.custom1=}"
Since event.download.finished. is the same and filebot starts with an F it will always run before move_complete which starts with an M. To fix that I simply added a z in front of filebot (event.download.finished,zfilebot) to put it at the end.
The proper setup is as follows:
in .rtorrent.rc change the default directory to
Code: Select all
directory = /path/to/downloading
personally I'm using /media/d5/downloading
Next, you need to insert the following into .rtorrent.rc
Code: Select all
method.insert = d.get_finished_dir, simple, "cat=~/Download/,$d.custom1="
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="
I'm using "cat=/media/d5/downloads/,$d.custom1="
taken from: https://github.com/rakshasa/rtorrent/wi ... d-location
Lastly I discovered that rtorrent was running the postprocess first and then moving the completed download to its proper resting place which results in a never-ending cycle of the last torrent not getting processed until a new torrent is downloaded. After chatting with the fine folks in #rtorrent on Freenode they told me that, "A multi command is an array of simple commands, indexed by a name. When you call a multi-command, the sequence is executed in order of the keys used when defining a single command of the sequence." -Pyroscope
In this case you likely have the following 2 keys in .rtorrent.rc
method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.get_finished_dir="
method.set_key = event.download.finished,filebot,"execute={/home/user/rtorrent-postprocess.sh,$d.base_path=,$d.name=,$d.custom1=}"
Since event.download.finished. is the same and filebot starts with an F it will always run before move_complete which starts with an M. To fix that I simply added a z in front of filebot (event.download.finished,zfilebot) to put it at the end.