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 the Sonarr/Radarr
import script)
that calls cross-seed
's HTTP API.
If you don't set this up, cross-seed
will eventually search everything
with searchCadence
.
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
Start by shelling into your docker container:
docker exec -it cross-seed sh
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
There are likely two versions of webhook command you want to use, depending
if you want to include episodes or not. There are other options available to
customize found here
, but these offer
no benefit to download completion.
You may be tempted to set ignoreCrossSeeds: false
for download completion triggers
but this offers no benefits. Partial matches will trigger a completion event in your
client once it completes. This creates a useless webhook search since this media
was just processed by cross-seed.
Use the webhook command with -d "includeSingleEpisodes=true"
while keeping
includeSingleEpisodes: false
in your config to minimize useless searches.
rTorrent
-
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> -d "infoHash=$2" -d "includeSingleEpisodes=true"OR
#!/bin/sh
curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> -d "infoHash=$2" -
Make it executable:
chmod +x rtorrent-cross-seed.sh
-
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 -
Restart rTorrent.
qBittorrent
-
Go to Tools > Options > Downloads.
-
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> -d "infoHash=%I" -d "includeSingleEpisodes=true"
OR
curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> -d "infoHash=%I"
Transmission
-
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> -d "infoHash=$TR_TORRENT_HASH" -d "includeSingleEpisodes=true"OR
#!/bin/sh
curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> -d "infoHash=$TR_TORRENT_HASH" -
Make it executable:
chmod +x transmission-cross-seed.sh
-
In Settings > Transfers > Management, select the script in the "Call script when download completes" menu item.
Deluge
-
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> -d "infoHash=$infoHash" -d "includeSingleEpisodes=true"OR
#!/bin/bash
infoHash=$1
name=$2
path=$3
curl -XPOST <BASE_URL>/api/webhook?apikey=<API_KEY> -d "infoHash=$infoHash" -
Make the script executable:
chmod +x deluge-cross-seed.sh
-
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