Event hooks allow you to trigger external programs or ZeroMQ messages when specific actions occur, such as uploads, renames/moves, or deletes.
ZeroMQ Integration:
Instead of running shell programs, hooks can send ZeroMQ messages. This is useful for notifying other services.
zmq:pub:<address>: Sends a PUB message to all connected SUB clients.zmq:push:<address>: Sends a PUSH message to exactly one connected PULL client (use t[seconds] like t3 to avoid blocking if no clients are connected).zmq:req:<address>: Sends a REQ message to a connected REP client (use t3,j to send extended upload info as JSON).
Legacy Upload Events:
For a more powerful, non-blocking, and multithreaded approach that has access to FFmpeg/mtp tags, you can use the older mte (metadata event) system. This is useful if you want to trigger a command only on new unique files and want to avoid holding up other uploads.
[global]
xau: zmq:pub:tcp://*:5556` # send a PUB to any/all connected SUB clients
xau: t3,zmq:push:tcp://*:5557` # send PUSH to exactly one connected PULL cli
xau: t3,j,zmq:req:tcp://localhost:5555` # send REQ to the connected REP cli