Move completed ONLY from download directory

dsouvik215

Member
May 25, 2018
896
0
16
Hi there,

I use the following code to move all completed downloads to a different folder.

Code:
system.method.set_key = event.download.finished,move_complete,"d.set_directory=/stnick/data/completed;execute=mv,-u,$d.get_base_path=,/stnick/data/completed"
This works great for me as then everything that lands up in /completed is then automatically synced down to my home computer.

However, occasionally I want to download something on my seedbox that I do not wish to be downloaded automatically to my home PC. So when I load the torrent, I specify a different target directory but the above code still moves it to /completed.

uTorrent has a sub-feature of "move completed" called "Only from download folder". When this is ticked, uTorrent will only move completed downloads from the DOWNLOADS directory, and not from any other directories.

Is there a way to implement this functionality in rTorrent? Thanks in advance for any help / suggestions.
 

dsouvik215

Member
May 25, 2018
896
0
16
Thanks for the reply Novik65.

However, unless I am missing something, this plugin will achieve exactly the same results as the code I already have in place and is NOT able to exclude downloads that were deliberately saved to a different folder.
 

das329717

Member
May 25, 2018
928
0
16
However, unless I am missing something, this plugin will achieve exactly the same results as the code I already have in place and is NOT able to exclude downloads that were deliberately saved to a different folder.
No. "The downloaded torrent data files are transferred to the directory, which is set in configuration, with the same directory structure relative to directory specified in variable "directory" of "rtorrent.rc" file and then started for seeding."
E.q. if you download your torrent *outside* directory specified in variable "directory" of "rtorrent.rc" file, then move operation will not occur.
But should warn you. This plugin can't work correctly, if you have "event.download.finished" operations in your rtorrent.rc.
 

dsouvik215

Member
May 25, 2018
896
0
16
Fantastic! It is working exactly like I had hoped!

Thank you so much for the assistance, Novik65.
 

dsouvik215

Member
May 25, 2018
896
0
16
Scratch that, its not working 100%.

I seem to have discovered a bug of some sort with this plugin. When I add a torrent that contains a single file (no folder) and save it to any directory OTHER THAN my default download directory, I am receiving an error in ruTorrent that reads:

[Hash checker was unable to map chunk: Not a directory]

If I disable AutoMove, it works fine. It would appear that even though AutoMove should be ignoring this torrent (since it is not in the downloads folder) it is still altering the destination, and adding the filename to path.

For example, I add the torrent for a file called "ubuntu-10.04.iso" and save it to /data/temp/. The torrent downloads, and then fails. When I click "Save To" and inspect the path, the path now reads "/data/temp/ubuntu-10.04.iso". If I then revert the path back to "/data/temp", the torrent seeds.

Any ideas?
 

dsouvik215

Member
May 25, 2018
896
0
16
Target definitely exists... The torrent actually downloads successfully to the target directory. Immediately after it completes though, AutoMove tampers with the target directory (even though it should be ignoring it) and that's where the problem comes in.

Also, I am using the SVN version.

Code:
At revision 2118.
Thanks for the help on this, but it looks to be a bug. cry.gif
 

jith45

Member
May 25, 2018
960
0
16
I have a similar problem since using Autotools and the AutoMove feature. It only seems to be a problem on torrents that have files in the root of the torrent, ie no directory.

Steps to replicate

1.) Click Add Torrent
2.) Specify any existing directory that is NOT the default save location.
3.) Choose a torrent that has a single file in the root (ie. not in a folder)
4.) Click Add File and wait for the torrent to download.
5.) rTorrent should report error ([Hash checker was unable to map chunk: Not a directory])
6.) Take note of the path where the downloaded file resides now. The filename has been appended to the path and therefore does not exist.
7.) Click Save To and re-enter the same path you entered in Step 2.
8.) Click Force Recheck
9.) Torrent now seeds 100%.

However if I uncheck automove, my problem is gone.

Any ideas?

Thanks for all the cool plug-ins smiley.gif
 

das329717

Member
May 25, 2018
928
0
16
Any ideas?
I'm not author of this plugin, but i may see on it.
Please, turn on $autodebug_enabled into plugin's conf.php, reproduce this error and paste here contents of the /tmp/errors.log (check it first, may be, it will contain some private data).
 

jith45

Member
May 25, 2018
960
0
16
Hi

Thanks for the quick reply.

I turned the log on, and loaded a single torrent, but log doesn't give anything other than it fired the plug-in.

Thanks

See below...


Code:
[05.09.12 14:58:31]
[05.09.12 14:58:31] AutoMove: --- begin ---
[05.09.12 14:58:31] AutoMove: --- end ---
 

jith45

Member
May 25, 2018
960
0
16
Hi

thought it might be helpful to show the log for a successful download and seed...

Code:
[05.09.12 14:55:54] AutoMove: --- begin ---
[05.09.12 14:55:54] AutoMove: Operation Move
[05.09.12 14:55:54] AutoMove: from /kockbag/data/downloads/
[05.09.12 14:55:54] AutoMove: to /kockbag/data/completed/
[05.09.12 14:55:54] rtOpFiles: finished
[05.09.12 14:55:54] AutoMove: ".mailto" file : not found!
[05.09.12 14:55:54] AutoMove: --- end ---


Tks
 

dsouvik215

Member
May 25, 2018
896
0
16
Thanks kockbag.

So am I correct in saying that the first log you pasted above is the result of trying to save a torrent to a folder OTHER THAN your default location? And the second one is the result of saving to the default location (ie. this works fine)?

If so, then you are experiencing exactly the same thing that I am seeing...
 

dsouvik215

Member
May 25, 2018
896
0
16
I am setting up a seedbox for a friend of mine, and as soon as I add the autotools plugin folder, ruTorrent throws the following error.
Code:
Bad response from server: (500 [error,getplugins])
I don't suppose you have any idea what could be causing this? I am not sure if this is related to the change you did earlier...
 

das329717

Member
May 25, 2018
928
0
16
I am setting up a seedbox for a friend of mine, and as soon as I add the autotools plugin folder, ruTorrent throws the following error.
Code:
Bad response from server: (500 [error,getplugins])
I don't suppose you have any idea what could be causing this? I am not sure if this is related to the change you did earlier...
See to web-server errors log.