-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify how to use or fix directory.watch.added #374
Comments
|
1.How can we do this? Wiki says its possible but I think it isn't with the current implementation. 2.
|
|
:) Have you actually tried it out? It won't work. And if it even would you can't pass argument into that very command.
I think it's because of this: code just takes it as it is |
Using arguments inside custom methods is supported. Someone should probably add this to the wiki. |
Thanks, I know that :) custom method , watch_dir definition What I meant is this:
Anyway, I'll create a new issue for this. |
The watchdir doesn't care if "load.start" or "foo.bar" is called as a handler, the file is available as "argument.0". So write a custiom method with load.start in it, and any after-load commands you need. Or even call a multi-method, the basic machinery will pass things on. Regarding the watch dir, use |
Are you talking about
Yep, it was written more than a year ago, but since it's working ... :) |
You were right @pyroscope , the quotes were the problem around the directory definition. |
To make things clear, just try the following (with the client already running). Not only can you add post-load commands as you see fit, as I mentioned before a multi-method looks just like any other method, so use it to get more out of your watch dir events. ;) mkdir -p $HOME/tmp/hotwatch
rtxmlrpc -i @- <<EOF
method.insert = my.inotify.handler, multi|rlookup|static
method.set_key = my.inotify.handler, !log, "print = \"Got notified about \", (argument.0)"
method.set_key = my.inotify.handler, load, "load.verbose = (argument.0), d.priority.set=0"
method.set_key = event.download.inserted_new, log_loaded, ((print, "ADDED ", ((d.name)) ))
directory.watch.added = $HOME/tmp/hotwatch, my.inotify.handler
EOF
mktor -o $HOME/tmp/hotwatch README local
sleep 2
touch $HOME/tmp/hotwatch/invalid.torrent And this is the console log you get:
The event handler is called twice, likely due to seeing both an open and a close event. As you can see above, What actually needs fixing is that Now someone edit that wiki page… |
is there any way to remove directories from the watch list? |
a) issues is not a support channel |
a) I felt it was related to the underlying issue. clarifying how directory.watch.added works. I.E. whether it is reversible. Understood, I'll open a new issue for it. b) My bad, didn't notice it was 2 years old. |
Your wiki page TORRENT Watch directories states that one can use inotify on Linux for watching directories:
However, I can't figure out how to use this command.
Having
in the rtorrent.rc, starting rtorrent results in the error:
I figured, one should use it like the other commands
start_tied
,stop_untied
, etc., so I putinto the rc. The, rtorrent starts up, but prints:
I'm on version 0.9.6-3 of the arch linux package (Rakshasa's BitTorrent client version 0.9.6.)
The text was updated successfully, but these errors were encountered: