Skip to content

Commit 4638c94

Browse files
authored
fix xseed.sh XSEED_APIKEY
1 parent b0fd592 commit 4638c94

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

xseed.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ USENET_CLIENT_NAME=${USENET_CLIENT_NAME:-SABnzbd}
1212
XSEED_HOST=${XSEED_HOST:-crossseed}
1313
XSEED_PORT=${XSEED_PORT:-8080}
1414
LOG_FILE=${LOG_FILE:-/var/log/xseed.log}
15+
XSEED_APIKEY=${XSEED_APIKEY}
1516

1617
# Function to send a request to Cross Seed API
1718
cross_seed_request() {
1819
local endpoint="$1"
1920
local data="$2"
2021
local headers=(-X POST "http://$XSEED_HOST:$XSEED_PORT/api/$endpoint" --data-urlencode "$data")
21-
if [ -n "$xseed_apikey" ]; then
22-
headers+=(-H "X-Api-Key: $xseed_apikey")
22+
if [ -n "$XSEED_APIKEY" ]; then
23+
headers+=(-H "X-Api-Key: $XSEED_APIKEY")
2324
fi
2425
response=$(curl --silent --output /dev/null --write-out "%{http_code}" "${headers[@]}")
2526
echo "$response"

0 commit comments

Comments
 (0)