Watcher
The watcher is the automatic mode: the bot monitors a folder and uploads to the tracker everything that lands in it. Great paired with a client downloading to a fixed folder.
Start
unit3dup -watcher
The flag takes no parameters: everything is configured in Unit3Dbot.json.
Configuration
In user_preferences (Advanced options):
"WATCHER_INTERVAL": 60,
"WATCHER_PATH": "/path/source/folder",
"WATCHER_DESTINATION_PATH": "/path/destination/folder",
WATCHER_PATH→ the watched folder (e.g. where files get downloaded)WATCHER_DESTINATION_PATH→ the folder where files are moved and uploaded fromWATCHER_INTERVAL→ how many seconds between checks
What happens on every cycle
When WATCHER_INTERVAL expires (you see the countdown on screen):
- It checks
WATCHER_PATH; if empty, the countdown restarts - It moves all files to
WATCHER_DESTINATION_PATH, preserving subfolders (emptied folders are removed) - It processes the moved files and uploads them to the tracker with seeding, like a
-scan - It starts over
The loop is endless: exit with ++ctrl+c++.
Files are moved, not copied
WATCHER_PATH gets emptied on every cycle. Don't point it to a folder whose files must stay where they are (e.g. your client's seeding folder).
Folder missing?
If WATCHER_PATH doesn't exist or isn't configured, the bot stops with Watcher path does not exist or is not configured.