Skip to content

Triggering Searches

KyokoMiki edited this page Oct 25, 2025 · 3 revisions

Triggering Searches

Nemorosa can immediately search for cross-seeds when torrents finish downloading by adding an on-completion script to your torrent client (or the Sonarr/Radarr import script) that calls Nemorosa's HTTP API.

Overview

By configuring the client, you can automatically send webhooks to nemorosa when downloads complete, providing immediate cross-seeding without waiting for scheduled jobs.

Setting Up Your Torrent Client

Transmission

  1. Create transmission-nemorosa.sh, replacing <BASE_URL> and <API_KEY> with the correct values:
#!/bin/sh
curl -XPOST <BASE_URL>/api/webhook?infohash=$TR_TORRENT_HASH \
-H "Authorization: Bearer <API_KEY>"
  1. Make it executable:
chmod +x transmission-nemorosa.sh
  1. In Settings > Transfers > Management, select the script in the "Call script when download completes" menu item.

qBittorrent

  1. Go to Tools > Options > Downloads.
  2. Enable Run external program on torrent completion, replacing <BASE_URL> and <API_KEY> with the correct values:
curl -XPOST <BASE_URL>/api/webhook?infohash=%I \
-H "Authorization: Bearer <API_KEY>"

Deluge

  1. Create a file called deluge-nemorosa.sh, replacing <BASE_URL> and <API_KEY> with the correct values:
#!/bin/bash
infohash=$1
name=$2
path=$3
curl -XPOST <BASE_URL>/api/webhook?infohash=$infohash \
-H "Authorization: Bearer <API_KEY>"
  1. Make the script executable:
chmod +x deluge-nemorosa.sh
  1. In Deluge:
    • Enable the Execute plugin
    • Under Add Command, select the event Torrent Complete and input: /path/to/deluge-nemorosa.sh - Press Add and Apply
    • Restart your Deluge client/daemon

rTorrent

  1. Create a script named rtorrent-nemorosa.sh, replacing <BASE_URL> and <API_KEY> with the correct values:
#!/bin/sh
curl -XPOST <BASE_URL>/api/webhook?infohash=$2 \
-H "Authorization: Bearer <API_KEY>"
  1. Make it executable:
chmod +x rtorrent-nemorosa.sh
  1. Add to .rtorrent.rc:
echo 'method.insert=d.data_path,simple,"if=(d.is_multi_file),(cat,(d.directory),/),(cat,(d.directory),/,(d.name))"' >> ~/.rtorrent.rc
echo 'method.set_key=event.download.finished,nemorosa,"execute={/full/path/to/rtorrent-nemorosa.sh,$d.name=,$d.hash=,$d.data_path=}"' >> ~/.rtorrent.rc

Note: Replace /full/path/to/rtorrent-nemorosa.sh with the absolute path to your script.

  1. Restart rTorrent