Results 1 to 6 of 6

Thread: rTorrent automatic stop/remove/move torrents

  1. #1
    Join Date
    Mar 2009
    Beans
    111

    Arrow rTorrent automatic stop/remove/move torrents

    I have installed rTorrent on my 8.04 server; it's working perfect! Now I would like to fine-tune by using the .rtorrent.rc file. What I want is this:

    • Scan directory for new .torrent files
    • Download (partial completed) torrents to /home/user/downloads/incomplete
    • Once completed, the data must be moved to /home/user/downloads/complete and keeps seeding until 150%
    • When ratio of 150% is reached, remove torrent from rTorrent


    I think this all is possible, but I can't manage to do this. Please have a look at my config file below. The 'watch'-dir. is working perfect. After copying a file into the directory, rTorrents starts downloading. But the automatic moving function does not work. What am I doing wrong?

    Code:
    # Default directory to save the downloaded torrents.
    directory = /home/smeerbartje/downloads/incomplete
    
    # Watch a directory for new torrents, and stop those that have been
    # deleted.
    schedule = watch_directory,5,5,load_start=/home/smeerbartje/downloads/torrent/*.torrent
    schedule = untied_directory,5,5,stop_untied=      ??? what to put here ???
    
    # Session directory
    session = /home/smeerbartje/downloads/session
    
    # Move completed torrents
    on_finished = move_complete,"d.set_directory=/home/smeerbartje/downloads/incomplete/;execute=mv,-u,$d.get_base_path=,/home/smeerbartje/downloads/complete/"
    
    
    # Stop torrents when reaching upload ratio in percent,
    # when also reaching total upload in bytes, or when
    # reaching final upload ratio in percent.
    # example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
    schedule = ratio,60,60,"stop_on_ratio=200,200M,2000"

  2. #2
    Join Date
    Apr 2006
    Location
    Norway
    Beans
    153

    Re: rTorrent automatic stop/remove/move torrents

    Try to change this:
    Code:
    on_finished = move_complete,"d.set_directory=/home/smeerbartje/downloads/incomplete/;execute=mv,-u,$d.get_base_path=,/home/smeerbartje/downloads/complete/"
    To this

    Code:
    on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/smeerbartje/downloads/complete/;d.set_directory=/home/smeerbartj/downloads/complete/"
    I find it very confusing that there are now two pointers to the completed folder, but this works for me.

    Anders

  3. #3
    Join Date
    Mar 2009
    Beans
    111

    Re: rTorrent automatic stop/remove/move torrents

    Quote Originally Posted by GrimmVarg View Post
    Try to change this:
    Code:
    on_finished = move_complete,"d.set_directory=/home/smeerbartje/downloads/incomplete/;execute=mv,-u,$d.get_base_path=,/home/smeerbartje/downloads/complete/"
    To this

    Code:
    on_finished = move_complete,"execute=mv,-u,$d.get_base_path=,/home/smeerbartje/downloads/complete/;d.set_directory=/home/smeerbartj/downloads/complete/"
    I find it very confusing that there are now two pointers to the completed folder, but this works for me.

    Anders
    I tried your suggestion, but unfortunately it didn't work. It receive error messages at the bottom line of rTorrent saying: "Download event action failed: Bad return code.". Can you tell me how to interpretate the on_finished event?

  4. #4
    Join Date
    Jan 2008
    Beans
    8

    Re: rTorrent automatic stop/remove/move torrents

    Dunno if this is still a problem but as I found it via google so I'll respond for future readers.

    With rtorrent 0.8.4 and beyond all these commands have changed.

    Quote Originally Posted by smeerbartje View Post
    I have installed rTorrent on my 8.04 server; it's working perfect! Now I would like to fine-tune by using the .rtorrent.rc file. What I want is this:

    • Scan directory for new .torrent files
    • Download (partial completed) torrents to /home/user/downloads/incomplete
    • Once completed, the data must be moved to /home/user/downloads/complete and keeps seeding until 150%
    • When ratio of 150% is reached, remove torrent from rTorrent


    I think this all is possible, but I can't manage to do this. Please have a look at my config file below. The 'watch'-dir. is working perfect. After copying a file into the directory, rTorrents starts downloading. But the automatic moving function does not work. What am I doing wrong?

    Code:
    # Default directory to save the downloaded torrents.
    directory = /home/smeerbartje/downloads/incomplete
    
    # Watch a directory for new torrents, and stop those that have been
    # deleted.
    schedule = watch_directory,5,5,load_start=/home/smeerbartje/downloads/torrent/*.torrent
    schedule = untied_directory,5,5,stop_untied=      ??? what to put here ???
    
    # Session directory
    session = /home/smeerbartje/downloads/session
    
    # Move completed torrents
    on_finished = move_complete,"d.set_directory=/home/smeerbartje/downloads/incomplete/;execute=mv,-u,$d.get_base_path=,/home/smeerbartje/downloads/complete/"
    
    
    # Stop torrents when reaching upload ratio in percent,
    # when also reaching total upload in bytes, or when
    # reaching final upload ratio in percent.
    # example: stop at ratio 2.0 with at least 200 MB uploaded, or else ratio 20.0
    schedule = ratio,60,60,"stop_on_ratio=200,200M,2000"
    #To watch a directory for new torrents:
    schedule = watch_directory,10,10,"load_start=~/pathtotorrents/*.torrent"
    schedule = tied_directory,10,10,start_tied=
    schedule = untied_directory,10,10,close_untied=

    #Move files to folder Complete (change to fit)
    system.method.set_key = event.download.finished,move_complete,"execute=mv,-u,$d.get_base_path=,~/Complete;d.set_directory=~/Complete"

    Stop on ratio is also changed with 0.8.4. New syntax is these three commands, only 1 is needed for what you want to achieve though:
    #Stop torrents when reaching upload ratio 150 percent
    ratio.enable=
    ratio.min.set=150
    #ratio.max.set=300
    #ratio.upload.set=100M

    Hope it helps. You can also pretty easily get rtorrent unpack your files and do other fun stuff. But what I haven't figured out yet is how to delete the rar files when reaching the specified ratio (I unpack everything after download so don't need them).

  5. #5
    Join Date
    May 2006
    Beans
    339

    Re: rTorrent automatic stop/remove/move torrents

    I am reallllly struggling with this command

    My ultimate goal is to move torrents based upon their tracker, and I am really close, but for some reason I cannot get this command to execute correctly.

    Code:
    system.method.set_key = event.download.inserted_session,tracker,"d.set_custom2=$execute_capture={script.sh,$d.get_tied_to_file=}"

    rtorrent throws this error:

    Code:
     Download event action failed: Could not find closing '}'

  6. #6
    Join Date
    Sep 2007
    Beans
    81

    Re: rTorrent automatic stop/remove/move torrents

    Try this:

    Code:
    system.method.set_key = event.download.inserted_session,tracker,"d.set_custom2=\"$execute_capture={script.sh,$d.get_tied_to_file=}\""
    Vaio AR590E - 2GHz Core2Duo, 2GB RAM, 320GB HDD, 17" LCD (1920 X 1200), GeForce 8600M GT, Blu-ray RE
    Vaio VGN-A790 - 1.7GHz Cetrino, 1GB RAM, 100GB HDD, 17" LCD (1920 X 1200), Radeon X600, DVD-RW

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •