FYI: shell script to show SABnzbd's Queue and History
Posted: March 14th, 2023, 8:33 am
If you only have terminal / SSH access to a system running SABnzbd, here's a script to show SABnzbd's Queue and History
Code: Select all
#!/bin/sh
# Show SABnzbd's Queue and History, from the commandline
# Get the api-key
APIKEY=`awk ' /^api_key/ { print $NF }' ~/.sabnzbd/sabnzbd.ini`
echo $APIKEY
echo "QUEUE:"
lynx --dump "http://127.0.0.1:8080/api?output=json&apikey=$APIKEY&mode=queue" | python3 -m json.tool | grep -i filename
echo "HISTORY:"
lynx --dump "http://127.0.0.1:8080/api?output=json&apikey=$APIKEY&mode=history" | python3 -m json.tool | grep -i -e nzb_name -e status