rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.07k stars 408 forks source link

Move completed - Specific label #1052

Open eathanc6 opened 3 years ago

eathanc6 commented 3 years ago

Heya,

So I'm currently moving all completed torrents to a new folder but I can't figure out how to move specific label to a different folder instead. Here is the code I am currently using:

schedule = watch_directory_99,5,5,"load.start=/download/temp/*.torrent,\"d.directory.set=/download/temp/\",\"d.custom.set=auto,/download/completed/\""

method.insert = d.get_finished_dir,simple,"cat=/download/completed/,$d.custom="
method.set_key = event.download.finished,move_complete,"d.directory.set=$d.get_finished_dir=;execute2=mkdir,-p,$d.get_finished_dir=;execute2=mv,-u,$d.base_path=,$d.get_finished_dir="

I'm trying to move Label XxX to folder completed/XxX instead of completed/

Any ideas how I can achieve that? Thanks!

robototechnic commented 3 years ago

It's very simple mkdir -p /home/user/{Videos,Music,Others,Torrents/{Videos,Music,Others,.session,.loads}}

nano ~/.rtorrent.rc

session.path.set = /home/user/Torrents/.session/
directory.default.set = /home/user/Torrents/.loads/

schedule2 = watch_directory_1,10,180,"load.normal=/mnt/rootfs/home/user/Torrents/Videos/*.torrent,d.custom1.set=Videos"
schedule2 = watch_directory_2,20,180,"load.normal=/mnt/rootfs/home/user/Torrents/Music/*.torrent,d.custom1.set=Music"
schedule2 = watch_directory_3,30,180,"load.normal=/mnt/rootfs/home/user/Torrents/Others/*.torrent,d.custom1.set=Others"
method.insert = check_for_readiness,simple,"and={d.complete=,d.custom1=}"
method.insert = set_final_dir,simple,"cat=/home/user/,$d.custom1="
method.insert = move_torrent,simple,"d.stop=;d.directory.set=$set_final_dir=;execute=mv,-f,$d.base_path=,$set_final_dir=;d.custom1.set=;d.start="
method.set_key = event.download.finished,move_complete,"branch={$check_for_readiness=,move_torrent=}"

Put new torrent file in directory /home/user/Torrents, when download wil be complited, ypu find downloaded files in /home/user/Videos or /home/user/Music or /home/user/Others