Skip to main content

Triggering Searches

Cross-seed gives you the ability to search for cross-seeds as soon as a torrent finishes downloading, by adding an on-completion script to your torrent client (or bakerboy448's Sonarr/Radarr import script) that calls cross-seed's HTTP API.

If you don't set this up, cross-seed will eventually search everything during its daily backlog scan.

All the techniques mentioned below boil down to using the curl command to send an HTTP POST request to the cross-seed daemon, which will look like this.

curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY>&infoHash=<infoHash>

Step 1: Find Your API Key

Docker

Start by shelling into your docker container:

docker exec -it cross-seed bash

Use the command:

cross-seed api-key

We will refer to this key as <API_KEY> in the examples below.

Step 2: Find your Base URL

Non-Docker Users

Your cross-seed daemon will be available at:

http://localhost:2468

Docker Users

Use:

http://cross-seed:2468

We will refer to this as <BASE_URL> below.

Setting Up Your Torrent Client

rTorrent
  1. Create a script named rtorrent-cross-seed.sh, replacing <BASE_URL> and <API_KEY> with the correct values from above:
    #!/bin/sh
    curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> --data-urlencode "infoHash=$2"
  2. Make it executable:
    chmod +x rtorrent-cross-seed.sh
  3. 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,cross_seed,"execute={'`pwd`/rtorrent-cross-seed.sh',$d.name=,$d.hash=,$d.data_path=}"' >> .rtorrent.rc
  4. Restart rTorrent.
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 from above:
    curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> --data-urlencode "infoHash=%I"
Transmission
  1. Create transmission-cross-seed.sh, replacing <BASE_URL> and <API_KEY> with the correct values from above:
    #!/bin/sh
    curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> --data-urlencode "infoHash=$TR_TORRENT_HASH"
  2. Make it executable:
    chmod +x transmission-cross-seed.sh
  3. In Settings > Transfers > Management, select the script in the "Call script when download completes" menu item.
Deluge
  1. Create a file called deluge-cross-seed.sh, replacing <BASE_URL> and <API_KEY> with the correct values from above:

    #!/bin/bash
    infoHash=$1
    name=$2
    path=$3
    curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> --data-urlencode "infoHash=$infoHash"
  2. Make the script executable:

    chmod +x deluge-cross-seed.sh
  3. In Deluge:

    • Enable the Execute plugin
    • Under Add Command, select the event Torrent Complete and input: /path/to/deluge-cross-seed.sh - Press Add and Apply
    • Restart your Deluge client/daemon