We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0fd592 commit 4638c94Copy full SHA for 4638c94
1 file changed
xseed.sh
@@ -12,14 +12,15 @@ USENET_CLIENT_NAME=${USENET_CLIENT_NAME:-SABnzbd}
12
XSEED_HOST=${XSEED_HOST:-crossseed}
13
XSEED_PORT=${XSEED_PORT:-8080}
14
LOG_FILE=${LOG_FILE:-/var/log/xseed.log}
15
+XSEED_APIKEY=${XSEED_APIKEY}
16
17
# Function to send a request to Cross Seed API
18
cross_seed_request() {
19
local endpoint="$1"
20
local data="$2"
21
local headers=(-X POST "http://$XSEED_HOST:$XSEED_PORT/api/$endpoint" --data-urlencode "$data")
- if [ -n "$xseed_apikey" ]; then
22
- headers+=(-H "X-Api-Key: $xseed_apikey")
+ if [ -n "$XSEED_APIKEY" ]; then
23
+ headers+=(-H "X-Api-Key: $XSEED_APIKEY")
24
fi
25
response=$(curl --silent --output /dev/null --write-out "%{http_code}" "${headers[@]}")
26
echo "$response"
0 commit comments