How to get auto-tools working properly

simur612

Member
May 25, 2018
879
0
16
Ok, i must admit that i originally set this addon up wrong. This is mostly due to errors on my system, nothing seemed to work properly and i misunderstood how this addons worked so the point of this post is to explain how it works, what it does and how to set it up.


First of all, I'd like to thank the addon's author, without his help i'd never be writing this post, because it would still be broken.

First, let's talk about auto-label. The purpose of this addon is simple, it labels the torrents automatically so you can browse the webui by "Labels"

The way this works is fairly simple. All you need to do is create subdirectories inside your rtorrent download path. You can organize them any way you please but it generally makes sense to do something like this:

provided your rtorrent download path is /home/wonslung/rtorrent/ you might make the following directories:
Code:
/home/wonslung/rtorrent/Video
/home/wonslung/rtorrent/Video/Tv
/home/wonslung/rtorrent/Video/Tv-720p
/home/wonslung/rtorrent/Video/Movies
/home/wonslung/rtorrent/Music
/home/wonslung/rtorrent/Software
/home/wonslung/rtorrent/Software/Games
then, when you go to download a torrent, choose one of these subdirectories as your download path and the auto-label addon will create a label based on the download path. Forinstance, if you save a torrent to /home/wonslung/rtorrent/Video/TV-720p it will have the label "Video/TV-720p"

Auto-move works on very much the same principle as Auto-label, except you set a directory for finished downloads to be moved to. There can be several reasons you'd want to do this, but let me share with you MY reasons. I have a remote seedbox. I wanted to set up rsync to automatically download my finished torrents, but without this addon, i'd be downloading incomplete torrents which could cause problems. (imagine rsync downloading a file that wasn't done) With this addon, i can set up a directory for Complete torrents and rsync will automatically download them for me without this problem.

Annnnnyways, Let's say you want all finished torrents to be moved to /home/wonslung/Finished/ just create the directory, make sure it's read/write/execute for the user which runs rtorrent and set this as your auto-move dir. Now, just like when you used auto-label earlier, when you select a torrent for download, pick one of the subdirectories. Autolabel will label it, then when the torrent finished downloading, auto-move will move it, replicating the directory structure.

This can also be very useful for people who run rtorrent on thier NAS because you could set your rtorrent download path with directories mirroring that of what you'd like to store. Forinstance, i could imagine something like this:

Code:
/home/wonslung/rtorrent/Video/Television/High.Res/Fringe/Season1/
then set your automove directory to wherever you keep your files, and it will sync them up in this way. Also, this can be very powerful with RSS. you can set the rss download directory to any of the subdirectories in your path and auto-move will move them accordingly.



Some important things: I've found that running rtorrent with a unix socket causes this addon to fail a good portion of the time. I'm not sure why this should be true, but it is.

If you don't have php-cli installed on your system, this addon won't work. The path may also need to be set up in rutorrent, in the config.php
On FreeBSD i needed to create a separate php-cli.ini for php, and set register_argc_argv = on

if you do not have this set for php-cli, this addon will not work. This may not effect people using mod_php but it will effect those using php-cgi (if you use any webserver OTHER than apache, this means you)

If you are having problems, set
Code:
$autodebug_enabled = true;
in rutorrent/plugins/autotools/conf.php

this should create a log in /tmp called /tmp/error.log
 

lisas4567

Member
May 25, 2018
773
0
16
Hi,

for some reason I can't get the autotools to work. I followed your guide but the problem is that rtorrent hangs as soon as one of the autotools is supposed to do something. I have autolabel and automove enabled, debug is enabled but the error.log doesn't help too much:
Code:
xbmc@xbmc:/tmp$ cat rutorrent.log
[07.02.10 12:30:41]
[07.02.10 12:30:41] AutoWatch: --- begin ---
[07.02.10 12:30:41] AutoWatch: enabled : 0
[07.02.10 12:30:41] AutoWatch: autostart : 0
[07.02.10 12:30:41] AutoWatch: --- end ---
[07.02.10 12:31:24]
[07.02.10 12:31:24] AutoLabel: --- begin ---
[07.02.10 12:31:24] AutoLabel: enabled : 1
I upload a torrent and then rutorrent gets unrespsonsive, the connection to rtorrent times out (that's also what the webinterface tells me). I then check the running processes on the console with "ps ax | grep php" and see the following
Code:
8409 pts/3 S+ 0:00 /usr/bin/php /home/xbmc/rutorrent3/rutorrent/plugins/autotools/label.php 9CCDD22A714681C618842431AC359396949CF056I then kill this process and rtorrent "wakes up" and rutorrent shows the torrent - not labeled though.

PHP is installed:
Code:
xbmc@xbmc:/tmp$ php --version
PHP 5.2.10-2ubuntu6.4 with Suhosin-Patch 0.9.7 (cli) (built: Jan 6 2010 22:41:56)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies

Any ideas or any direction I might poke around?

thnx!
 

simur612

Member
May 25, 2018
879
0
16
a couple things to check:

php extensions.

you may be missing one that is important. I'm PRETTY sure you need the xmlrpc php extension

Also, which distro are you using? i know on FreeBSD this didn't work properly for me at first because my php binary was using php-cgi and not php-cli

and one other thing, if you are using php-cli, you need to find the config file and make sure register_argc_argv is on.

Those are the first things i'd check.


It sounds like it's having trouble with php though, it's likely a missing extension and/or a bad php.ini file

if you need, i can post my php extensions.


Also, another thing. It doesn't seem to work on the BASE dir, only subdirs of that base...for instance, if your download dir is
/home/wonslung/torrents/

and you set a torrent to download there, it won't do anything, but if you set it to download to /home/wonslung/torrents/Video/TV/ it should get labeled Video/TV and moved to /some/dir/Video/TV (if you have auto-move set)
 

simur612

Member
May 25, 2018
879
0
16
yes, this plugin was difficult for me to get working as well. This is why i wrote the guide. If we can't trouble shoot it and get it working we will need to open a ticket. If you were on FreeBSD i know i could get it working. another thing which might play a role is the version of xmlrpc-c rtorrent is compiled with. I KNOW versions under 1.11 have problems with many plugins


Also, i you can, tell me what distro you are running. I have a nice XEN server on my nas so i can try to install rutorrent on any os and troubleshoot it if i need.

This way i can give you a more definitive answer on how to fix it if you run into trouble.
 

shwetha17

Member
May 24, 2018
785
0
16
Sorry but i still don't get how this is working huh.gif Currently i use rtorrent for moving - but i'm quite tired of the rehashing after it has moved the files.
This is my setup:

Incomplete_dir: /home/admin/ftp/.incomplete/rtorrent/
Quote
Incoming torrentfiles:Move_files_done:/home/admin/rtorrent/watchdir-appz/home/admin/ftp/Appz/home/admin/rtorrent/watchdir-audiobook/home/admin/ftp/Audiobooks/home/admin/rtorrent/watchdir-covers/home/admin/ftp/cover/home/admin/rtorrent/watchdir-divx/home/admin/ftp/divx/home/admin/rtorrent/watchdir-dvd/home/admin/ftp/dvd/home/admin/rtorrent/watchdir-ebooks/home/admin/ftp/Ebooks​


Is this setup possible? huh.gif
 

Attachments

simur612

Member
May 25, 2018
879
0
16
you may be missing one that is important. I'm PRETTY sure you need the xmlrpc php extension
That is installed: php5-xmlrpc 5.2.10
Also, which distro are you using? i know on FreeBSD this didn't work properly for me at first because my php binary was using php-cgi and not php-cli
I'm running Ubuntu 9.11. Honestly no idea how to figure out whether I'm running php-cgi or php-cli. If I can use "php" on the command line doesn't indicate it's cli, is it?
and one other thing, if you are using php-cli, you need to find the config file and make sure register_argc_argv is on.
In my /etc/php5/cli/php.ini "register_argc_argv = On" is set.
Also, another thing. It doesn't seem to work on the BASE dir, only subdirs of that base...for instance, if your download dir is
/home/wonslung/torrents/

and you set a torrent to download there, it won't do anything, but if you set it to download to /home/wonslung/torrents/Video/TV/ it should get labeled Video/TV and moved to /some/dir/Video/TV (if you have auto-move set)
That's what I tried - downloading to "/some/dir/torrents/video/tv" with "/some/dir/torrents/" being the BASE dir.

I compiled rtorrent with xmlrpc-c v1.11. It's a little unfortuanate that the logging isn't really talkative
 

lisas4567

Member
May 25, 2018
773
0
16
ok, so I just updated to the newst svn version and don't ask me why, it now works ... just like that

Should I ever feel the need I will dig and will try to figure out what might've caused it but for now I'm just a happy camper. Thanks a lot again for your support wonslung - I appreciate your help!
 

simur612

Member
May 25, 2018
879
0
16
hehe, did you update to the 3.0 branch?
(and your welcome)
No, I was already using it - just updated to the latest svn version of it.

The only (?) remaining question I now have is that rtorrent can't "see" the torrent after autotools have moved them. So automove moves the downloaded files fine after completion and the rtorrent wines about not being able to find the files anymore.
I guess I will need to look at options and settings.

good night

j.
 

randac56

Member
May 25, 2018
915
0
16
this may be due to permissions and it ALSO may be due to your directory settings in the rutorrent config
 

peshua19

Member
May 25, 2018
897
0
16
Sorry but i still don't get how this is working
Currently i use rtorrent for moving - but i'm quite tired of the rehashing after it has moved the files.
This is my setup:

Incomplete_dir: /home/admin/ftp/.incomplete/rtorrent/
Quote
Incoming torrentfiles:Move_files_done:/home/admin/rtorrent/watchdir-appz/home/admin/ftp/Appz/home/admin/rtorrent/watchdir-audiobook/home/admin/ftp/Audiobooks/home/admin/rtorrent/watchdir-covers/home/admin/ftp/cover/home/admin/rtorrent/watchdir-divx/home/admin/ftp/divx/home/admin/rtorrent/watchdir-dvd/home/admin/ftp/dvd/home/admin/rtorrent/watchdir-ebooks/home/admin/ftp/Ebooks​


Is this setup possible?
 

saroos1

Member
May 25, 2018
718
0
16
it should be possible.

autotools now even has an "auto-watch" systme which can do recursive download structures....

so instead of 10 watch dir's you'd create one wiht subdirs

like this:

/somedir/watch/Video
/somedir/watch/Video/TV
/somedir/watch/Video/Movies
/somedir/watch/Music

and so on...
this would cause the torrents to be downloaded to a corresponding location in your download path

which, would be MOVED on completion (without rehashing) to the automove dir.
very awesome
 

simur612

Member
May 25, 2018
879
0
16
wonslung: Cool, i made it work. I had to uncomment my setting in rtorrent's config and restart everything. Is it possible to have specific ratio setting pr. watchdir?
 

lisas4567

Member
May 25, 2018
773
0
16
yes, this would be a very nice addition to the plugin. you should ask the author of the plugin, or open a bounty, or both
 

saroos1

Member
May 25, 2018
718
0
16
Ok, but i've changed back to rtorrents watchdir as i don't like the fact that download stat is "lost" when it changes from download to seeding. This is the way skipping the hashcheck works. Make a new torrent with fastresume, but download/upload stats on trackers are "lost". And by that i mean you're seeding but you havn't downloaded anything. Så using tracker to see tratio pr. torrent is impossible.