Novik / ruTorrent

Yet another web front-end for rTorrent
Other
2.01k stars 408 forks source link

automove not working for me #145

Closed nicobubulle closed 10 years ago

nicobubulle commented 10 years ago

From Wonslung@gmail.com on October 29, 2009 08:01:43

I'm not sure if this is an issue or not, but it seems to me that "automove" isn't working.

Just to be sure i understand it correctly, isn't it suppoed to move the torrent to the set directory as soon as it finished DOWNLOADING then seed from that directory? My download directory is /home/wonslung/rtorrent/download/ I've set automove to /home/wonslung/rtorrent/download/Complete

but nothing moves to that dir.

Original issue: http://code.google.com/p/rutorrent/issues/detail?id=146

nicobubulle commented 10 years ago

From Wonslung@gmail.com on October 29, 2009 00:58:45

since i couldn't get this to work as i wanted i set an automove rule in my .rtorrent.rc

if anyone cares, this is what you need for 0.8.5

system.method.set_key = event.download.finished,check_custom1,"branch=d.get_custom1=,d.set_custom2=$d.get_custom1=,d.set_custom2=~/rtorrent/download/Complete" system.method.set_key = event.download.finished,move_complete,"d.set_directory=$d.get_custom2= ;execute=mv,-n,$d.get_base_path=,$d.get_custom2="

nicobubulle commented 10 years ago

From Wonslung@gmail.com on October 29, 2009 00:59:25

by the way, that's 2 commands, it line wrapped

nicobubulle commented 10 years ago

From Wonslung@gmail.com on October 29, 2009 01:00:22

another note...on freebsd you need to use mv -n and on line it's mv -u

could this be why autotools doesn't work for me?

nicobubulle commented 10 years ago

From novik65 on October 29, 2009 01:49:11

Owner: dmrom00

nicobubulle commented 10 years ago

From dmrom00 on October 31, 2009 00:43:41

Automove plugin is much better then just a command :) It doesn't use "mv". It is implemented via php script.

There can be some reasons why it doesn't work for you.

  1. Check if your download directory of the torrent is a subdir of "directory=" param in rtorrent.rc
  2. Try to move "Complete" directory outside of "directory=" param
  3. Check if rtorrent user have proper permissions.

If problem doesn't solved then turn on logging $autodebug_enabled = true in conf.php and send log file to me.

nicobubulle commented 10 years ago

From Wonslung@gmail.com on November 05, 2009 10:48:42

my download directory is /home/wonslung/rtorrent/download/

the folder i want files moved to is /home/wonslung/rtorrent/download/Complete so i need to move it OUTSIDE of the download dir? i will try this.

nicobubulle commented 10 years ago

From Wonslung@gmail.com on November 05, 2009 14:07:46

i see this in the log over and over [05.11.09 22:00:15] --- move.php begin --- [05.11.09 22:00:15] Called without arguments (hash wanted)

nicobubulle commented 10 years ago

From Wonslung@gmail.com on November 15, 2009 23:34:59

Still not sure how to make this work. I've opened a thread on the forums if someone who understands this plugin can explain it. I need it to work WITH the rss plugin.

This is the thread in the forums: http://forums.rutorrent.org/index.php?topic=10.0

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 02, 2009 09:10:57

I'm STILL not able to get this plugins working. This is the only thing in rutorrent that i have left to do and it would mean a great deal for me. I really need to get auto-move working. If someone knows how to do this properly please let me know, i've tried setting this about 10 different ways and it is not working.

nicobubulle commented 10 years ago

From dmrom00 on December 04, 2009 08:01:04

Sorry for my disappearance, I'm really out of free time. Can you post all your settings?

  1. "directory = " param from rtorrent.rc
  2. your directory structure Let's find 11-th way :)
nicobubulle commented 10 years ago

From dmrom00 on December 04, 2009 08:11:27

P.S. can I have your full rtorrent.rc ? [05.11.09 22:00:15] --- move.php begin --- [05.11.09 22:00:15] Called without arguments (hash wanted) This means, that move.php script is called in wrong way. P.P.S. Does autolabel function work for you?

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 04, 2009 08:52:17

i THINK autolabel is working....maybe i'm confused as to how it's supposed to work....

actually....maybe it isn't working....It's selected as "on" but i still see a LOT of torrents without labels.....Do you have an email address? i'd rather send you the files you need via email.

my email is wonslung@gmail.com

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 04, 2009 09:01:01

just to give some more info.

my os is FreeBSD 7.2 amd64

my webdir is /usr/local/www/rtorrent/

my rtorrent user is /usr/home/wonslung

my rtorrent download dir is /usr/home/wonslung/rtorrent/download/

I tried setting the automove dir INSIDE this dir as /usr/home/wonslung/rtorrent/download/complete/

This failed, so per your suggestion (i think) i tried setting it OUTSIDE this dir as /usr/home/wonslung/rtorrent/complete and /usr/home/wonslung/complete and even /complete

none of these worked as well...i'm guessing this may be due to auto-label not working properly....is there a configuration i'm supposed to set up other than enabling it in "settings?"

All i REALLY want is this:

95% of ALL my torrents are downloaded via RSS, i want them to be moved to a different directory on completion and to be seeded from that new dir.

my reason is that, while it's nice to ahve all my torrents automated via rss, i still must manually download them to my home NAS (i have a seedbox or 3)

If i could make them automove i could set up a cronjob to simply rsync the entire contents of the /complete dir every so often. Then i could use my own local scripts to unrar and sort files.

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 05, 2009 12:42:52

to add it to the record....thanks to your help, we figured out one of the problems.

The default php.ini settings for freebsd have register_argc_argv = Off

this plugin needs register_argc_argv = On

this seems to at least get it to work SOMETIMES.

i don't know why it works sometimes, and why it doesn't others but when it DOESNT work this is what pops up in the error.log

[05.12.09 20:31:30] rXMLRPCRequest() fail!

I'm not a php coder at all but i noticed looking at the code that autotools uses the xmlrpc.php from the main rutorrent install...maybe someone who knows a lot more abotu this can figure out why it works sometimes but not others.

heres some of the log file

[05.12.09 20:23:37] --- label.php begin --- [05.12.09 20:23:37] AutoLabel state : 1 [05.12.09 20:23:37] rXMLRPCRequest() fail! [05.12.09 20:23:37] --- label.php end --- [05.12.09 20:26:23] [05.12.09 20:26:23] --- label.php begin --- [05.12.09 20:26:23] AutoLabel state : 1 [05.12.09 20:26:23] get_directory : /usr/home/wonslung/rtorrent/download/ [05.12.09 20:26:23] d.get_directory : /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E05.720p.HDTV.x264-CTU [05.12.09 20:26:23] d.get_custom3 : [05.12.09 20:26:23] d.is_multy_file : 1 [05.12.09 20:26:23] Label : TV [05.12.09 20:26:23] --- label.php end --- [05.12.09 20:26:45] [05.12.09 20:26:45] --- move.php begin --- [05.12.09 20:26:45] AutoMove state : 1 [05.12.09 20:26:45] path_to_finished is "/usr/home/wonslung/Complete" [05.12.09 20:26:45] get_directory : /usr/home/wonslung/rtorrent/download/ [05.12.09 20:26:45] d.get_base_path : /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E06.720p.HDTV.x264-CTU [05.12.09 20:26:45] d.get_base_filename : Dollhouse.S02E06.720p.HDTV.x264-CTU [05.12.09 20:26:45] d.is_multy_file : 1 [05.12.09 20:26:45] dest_path : /usr/home/wonslung/Complete/TV/ [05.12.09 20:26:45] Files in torrent : 26 [05.12.09 20:26:46] Move started: /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E06.720p.HDTV.x264-CTU/ -> /usr/home/wonslung/Complete/TV/Dollhouse.S02E06.720p.HDTV.x264-CTU/ [05.12.09 20:26:46] Move finished. Cleanup started: /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E06.720p.HDTV.x264-CTU/ [05.12.09 20:26:46] Execute d.set_directory=/usr/home/wonslung/Complete/TV/ [05.12.09 20:26:46] Execute d.open & d.start [05.12.09 20:26:46] --- move.php end --- [05.12.09 20:30:01] [05.12.09 20:30:01] --- move.php begin --- [05.12.09 20:30:01] AutoMove state : 1 [05.12.09 20:30:01] path_to_finished is "/usr/home/wonslung/Complete" [05.12.09 20:30:01] get_directory : /usr/home/wonslung/rtorrent/download/ [05.12.09 20:30:01] d.get_base_path : /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E05.720p.HDTV.x264-CTU [05.12.09 20:30:01] d.get_base_filename : Dollhouse.S02E05.720p.HDTV.x264-CTU [05.12.09 20:30:01] d.is_multy_file : 1 [05.12.09 20:30:01] dest_path : /usr/home/wonslung/Complete/TV/ [05.12.09 20:30:01] Files in torrent : 27 [05.12.09 20:30:02] Move started: /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E05.720p.HDTV.x264-CTU/ -> /usr/home/wonslung/Complete/TV/Dollhouse.S02E05.720p.HDTV.x264-CTU/ [05.12.09 20:30:02] Move finished. Cleanup started: /usr/home/wonslung/rtorrent/download/TV/Dollhouse.S02E05.720p.HDTV.x264-CTU/ [05.12.09 20:30:02] Execute d.set_directory=/usr/home/wonslung/Complete/TV/ [05.12.09 20:30:02] Execute d.open & d.start [05.12.09 20:30:02] --- move.php end --- [05.12.09 20:31:30] [05.12.09 20:31:30] --- label.php begin --- [05.12.09 20:31:30] AutoLabel state : 1 [05.12.09 20:31:30] rXMLRPCRequest() fail! [05.12.09 20:31:30] --- label.php end ---

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 05, 2009 15:43:21

ok, i finally figured out exactly why things weren't working correctly (thanks to dmrom00)

the problem is first, like i said in the last post, is that you need to set register_argc_argv = On

but, my error was worse, i had set php as php-cgi in my config.php setting it to php-cli (in freebsd this is /usr/local/bin/php ) didn't fix it right away, mainly because i didn't have a php-cli.ini file, but once i set one up with the proper settings, this plugin sprang into life.

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 05, 2009 17:45:36

update:

actually, i'm getting the occasional error with auto-label.

auto-move SEEMS to be working every time though

heres what the error looks like in the log [06.12.09 01:40:37] [06.12.09 01:40:37] --- label.php begin --- [06.12.09 01:40:37] AutoLabel state : 1 [06.12.09 01:40:37] rXMLRPCRequest() fail! [06.12.09 01:40:37] --- label.php end ---

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 05, 2009 20:00:15

i just had my first auto-move fail since i got it working. Auto-label seems to fail about 50% of the time and automove seems to only fail about 10% of the time.

Ideally, it would be nice to figure out why sometimes php5-xmlrpc works and other times it seems not to but outside of this, would there be a way to make it retry in the event of a failure?

Even if this were a tunable option, perhaps set in config.php, this would be very nice.

latest error from logs: [06.12.09 03:50:28] [06.12.09 03:50:28] --- move.php begin --- [06.12.09 03:50:28] AutoMove state : 1 [06.12.09 03:50:28] path_to_finished is "/usr/home/wonslung/Complete" [06.12.09 03:50:28] rXMLRPCRequest() fail (get info)! [06.12.09 03:50:28] --- move.php end ---

nicobubulle commented 10 years ago

From Wonslung@gmail.com on December 08, 2009 22:40:34

I went ahead and marked this as done.

2 major things were the major cause of this problem, as i mentions before, php-cli wasn't set up properly. Also, per a suggestion by dmrom00 i switched my setup to use an ip based socket (i was using unix sockets for rtorrent/rutorrent)

This seemns to have stopped all rXMLRPCRequest() fail based errors.

I'm not sure if this is something that CAN be fixed by the rutorrent team or not, but perhaps you guys can figure out why unix sockets do not work properly on FreeBSD

anyways, since this is an acceptable solution for me, i'm going to mark this error report as "Done"

Thanks again dmrom00 and novik

Status: Done