I did actually look at the Wiki and see I can check the queue with this
http://IP:PORT/sabnzbd/api?output=json&apikey=MYAPIKEY&mode=queue
But what if I want to check to see whether the queue is empty or not? Basically I want to update parity on a low powered server IF/WHEN Sab has finished download and process of files....
Check Queue Empty?
Re: Check Queue Empty?
You can look at noofslots_total, if it is 0 than there's nothing in the queue.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 8
- Joined: October 4th, 2021, 7:28 am
Re: Check Queue Empty?
hello
I need to come back to this, I also regularly want to check whether my queue is empty.
I see the noofslots_total value, but how can I access it? Parsing the api respond with jq gives an error "parse error: Invalid numeric literal at line 1, column 11".
Could anybody advise me another way to extract the value from the response?
I need to come back to this, I also regularly want to check whether my queue is empty.
I see the noofslots_total value, but how can I access it? Parsing the api respond with jq gives an error "parse error: Invalid numeric literal at line 1, column 11".
Could anybody advise me another way to extract the value from the response?
Re: Check Queue Empty?
Did you make sure to include mode=json in the url? Otherwise it will not output json to parse.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
Re: Check Queue Empty?
Works for me:
HTH
Code: Select all
sander@brixit:~$ curl -s 'http://192.168.1.4:8080/api?apikey=f7c0d38b95f2blablaa2607f5ba7673&output=json&mode=queue' | python3 -m json.tool | grep noof
"noofslots_total": 0,
"noofslots": 0,