It took me forever to find out how to do this with inotify, especially with the changes in commands from previous versions.

jtitosky
2019-04-14 04:51:29 +00:00
parent f17160fd5d
commit 495f7b62b5
+14
@@ -66,3 +66,17 @@ On Linux and using v0.9.7+, you may use inotify to watch a directory, and the pr
directory.watch.added = "~/Download/watch/", load.start
```
Here is an example using inotify to watch multiple directories and move the files to a different subdirectory based on the watch directory. It will also set the rutorrent category to match the watch directory.
```ini
method.insert = load_television, simple|private, "load.start_verbose=(argument.0), d.custom1.set=television"
directory.watch.added = "/downloads/watched/television/","load_television"
method.insert = load_movies, simple|private, "load.start_verbose=(argument.0), d.custom1.set=movies"
directory.watch.added = "/downloads/watched/movies/","load_movies"
method.insert = d.get_finished_dir,simple,"cat=/downloads/completed/,$d.custom1="
method.insert = d.update_dir,simple,"d.directory.set=$d.get_finished_dir="
method.insert = d.move_torrent_data,simple,"execute=mkdir,-p,$d.get_finished_dir=;execute=mv,-f,$d.base_path=,$d.get_finished_dir=;"
method.set_key = event.download.finished,move_complete,"d.update_dir=;d.move_torrent_data=;d.save_full_session="
```