You are not logged in.

#1 2009-12-26 22:31:48

distortion
Member
Registered: 2007-11-08
Posts: 45

[Solved] rTorrent, unable to move folder on completion

Hi everyone,

installed Arch on my home server earlier today and currently I'm trying to get rTorrent to work the way i want.

This is part of what I got in my .rtorrent.rc

schedule = watch_directory_1,10,10,"load_start=/home/dist/.rtorrent/watch/watchMusic/*.torrent,d.set_custom1=/srv/storage/music/"

system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom1=;execute=mv,$d.get_base_path=,$d.get_custom1="

Whenever a torrent is finished I get this error message in rTorrent:

Download event action failed: Bad return code.

And this is what I get in the execute log:

---
mv Torrent name
---
mv: cannot move `Torrent name `': No such file or directory

--- Error ---

From what i can understand it seems that rTorrent is trying to move the finished folder to a target directory that is empty (and by empty I mean '', i.e. to nothing).

I'm guessing that there's an error in my syntax somewhere, and if anyone can spot it, it would be greatly appreciated. If anything is unclear, please tell me.

Best regards,
distortion

Last edited by distortion (2009-12-27 13:43:14)

Offline

#2 2009-12-27 03:01:43

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] rTorrent, unable to move folder on completion

please post your full .rtorrent.rc file.

Offline

#3 2009-12-27 10:44:17

distortion
Member
Registered: 2007-11-08
Posts: 45

Re: [Solved] rTorrent, unable to move folder on completion

# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.

# Maximum and minimum number of peers to connect to per torrent.
#min_peers = 40
#max_peers = 100

# Same as above but for seeding completed torrents (-1 = same as downloading)
#min_peers_seed = 10
#max_peers_seed = 50

# Maximum number of simultanious uploads per torrent.
#max_uploads = 15

# Global upload and download rate in KiB. "0" for unlimited.
download_rate = 0
upload_rate = 0

# Default directory to save the downloaded torrents.
directory = /srv/storage/downloads/

# Default session directory. Make sure you don't run multiple instance
# of rtorrent using the same session directory. Perhaps using a
# relative path?
session = ~/.rtorrent/session/

# Watch a directory for new torrents, and stop those that have been
# deleted.
schedule = watch_directory_1,10,10,"load_start=/home/dist/.rtorrent/watch/watchMusic/*.torrent,d.set_custom1=/srv/storage/music/"

# Move finished torrents to /srv/storage depending on watch directory
system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom1=;execute=mv,$d.get_base_path=,$d.get_custom1="

log.execute = /home/dist/.rtorrent/rtorrent.exe.log

# Close torrents when diskspace is low.
#schedule = low_diskspace,5,60,close_low_diskspace=100M

# 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"

# Port range to use for listening.
port_range = 4000-4100

# Start opening ports at a random position within the port range.
port_random = yes

# Check hash for finished torrents. Might be usefull until the bug is
# fixed that causes lack of diskspace not to be properly reported.
check_hash = yes

# Encryption options, set to none (default) or any combination of the following:
# allow_incoming, try_outgoing, require, require_RC4, enable_retry, prefer_plaintext
#
# The example value allows incoming encrypted connections, starts unencrypted
# outgoing connections but retries with encryption if they fail, preferring
# plaintext to RC4 encryption after the encrypted handshake
#
encryption = allow_incoming,enable_retry,prefer_plaintext

# Enable DHT support for trackerless torrents or when all trackers are down.
# May be set to "disable" (completely disable DHT), "off" (do not start DHT),
# "auto" (start and stop DHT as needed), or "on" (start DHT immediately).
# The default is "off". For DHT to work, a session directory must be defined.
# 
dht = off

# Enable peer exchange (for torrents not marked private)
#
# peer_exchange = yes

#
# Do not modify the following parameters unless you know what you're doing.
#

# Hash read-ahead controls how many MB to request the kernel to read
# ahead. If the value is too low the disk may not be fully utilized,
# while if too high the kernel might not be able to keep the read
# pages in memory thus end up trashing.
#hash_read_ahead = 10

# Interval between attempts to check the hash, in milliseconds.
#hash_interval = 100

# Number of attempts to check the hash while using the mincore status,
# before forcing. Overworked systems might need lower values to get a
# decent hash checking rate.
#hash_max_tries = 10

That should be about it.

Offline

#4 2009-12-27 12:37:17

vik_k
Member
From: Pune, India
Registered: 2009-07-12
Posts: 227
Website

Re: [Solved] rTorrent, unable to move folder on completion

since you are using just one directory for watching why are you using "d.set_custom1"
you can just put this directory in "event.download.finished" line
as in my case I use:

directory = ~/torrents/.running
schedule = watch_directory,300,900,"load=~/downloads/*.torrent"
system.method.set_key = event.download.finished,move_complete,"execute=mv,-n,$d.get_base_path=,~/torrents/"

also why you have turned DHT off


"First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack." ~ George Carrette

Offline

#5 2009-12-27 13:42:35

distortion
Member
Registered: 2007-11-08
Posts: 45

Re: [Solved] rTorrent, unable to move folder on completion

vik_k wrote:

since you are using just one directory for watching why are you using "d.set_custom1"
you can just put this directory in "event.download.finished" line
as in my case I use:

directory = ~/torrents/.running
schedule = watch_directory,300,900,"load=~/downloads/*.torrent"
system.method.set_key = event.download.finished,move_complete,"execute=mv,-n,$d.get_base_path=,~/torrents/"

also why you have turned DHT off

Well, my intentions are to use multiple watch directories and move files after completion to different directories, so that's why smile. But I managed to solve the problem, it was just (as usual...) a file permission mistake from my side.

And DHT is off because some sites doesn't allow DHT.

Last edited by distortion (2009-12-27 17:10:35)

Offline

Board footer

Powered by FluxBB