Hey,
I've been playing with the notifications to integrate into a Node-RED flow via a webhook and am needing paused/resumed actions for items. Am I correct is saying the notifications aren't programmed for these events?
Thanks,
Notifications for paused/resumed items
Forum rules
Help us help you:
Help us help you:
- Are you using the latest stable version of SABnzbd? Downloads page.
- Tell us what system you run SABnzbd on.
- Adhere to the forum rules.
- Do you experience problems during downloading?
Check your connection in Status and Interface settings window.
Use Test Server in Config > Servers.
We will probably ask you to do a test using only basic settings. - Do you experience problems during repair or unpacking?
Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
-
- Newbie
- Posts: 11
- Joined: July 6th, 2020, 2:27 pm
Re: Notifications for paused/resumed items
Via config/notify I see below ... so also Pause Resume
Startup / Shutdown
Pause / Resume
Added NZB
Post-processing started
Job finished
Job failed
Warning
Error
Disk full
Queue finished
User logged in
Other Messages
Startup / Shutdown
Pause / Resume
Added NZB
Post-processing started
Job finished
Job failed
Warning
Error
Disk full
Queue finished
User logged in
Other Messages
-
- Newbie
- Posts: 11
- Joined: July 6th, 2020, 2:27 pm
Re: Notifications for paused/resumed items
Under testing that option is global pause and resume only, not the individual items/jobs.
Re: Notifications for paused/resumed items
Ah, yes, correct.
-
- Newbie
- Posts: 11
- Joined: July 6th, 2020, 2:27 pm
Re: Notifications for paused/resumed items
The only other option I can think of is using websocket, but from my research its not available?
Re: Notifications for paused/resumed items
I don't know about websocket, but if you're a programmer, you can get info from the SABnzbd API:
For example: two downloads in the queue, one is Paused, one is Downloading:
See https://sabnzbd.org/wiki/configuration/3.7/api for full details.
For example: two downloads in the queue, one is Paused, one is Downloading:
Code: Select all
$ curl -s 'http://127.0.0.1:8080/api?output=json&apikey=f69d7cdb668f4628b4238ff61af0acc8&mode=queue' | python3 -m json.tool | grep -e nzo_id -e status -e filename
"status": "Downloading",
"nzo_id": "SABnzbd_nzo_rj4enauh",
"filename": "My first download",
"status": "Paused",
"nzo_id": "SABnzbd_nzo_jyeb6yvj",
"filename": "My other download",
"status": "Downloading",
-
- Newbie
- Posts: 11
- Joined: July 6th, 2020, 2:27 pm
Re: Notifications for paused/resumed items
Thanks for the suggestion, but I do something summary already. I'm looking for a real time output or webhook post, rather than a request. I can loop the request but that's not ideal.
Re: Notifications for paused/resumed items
If you check sabnzbd.log, you can see this:
If you need it real-time, you can put it into the SABnzbd source code:
https://github.com/sabnzbd/sabnzbd/blob ... ue.py#L468
https://github.com/sabnzbd/sabnzbd/blob ... ue.py#L485
Code: Select all
$ cat .sabnzbd/logs/sabnzbd.log | grep -i -e "paused nzo" -e "resumed nzo"
2023-01-22 20:28:43,388::INFO::[nzbqueue:468] Paused nzo: SABnzbd_nzo_rj4enauh
2023-01-22 20:29:27,267::INFO::[nzbqueue:485] Resumed nzo: SABnzbd_nzo_rj4enauh
2023-01-22 20:29:32,502::INFO::[nzbqueue:468] Paused nzo: SABnzbd_nzo_rj4enauh
If you need it real-time, you can put it into the SABnzbd source code:
https://github.com/sabnzbd/sabnzbd/blob ... ue.py#L468
https://github.com/sabnzbd/sabnzbd/blob ... ue.py#L485
-
- Newbie
- Posts: 11
- Joined: July 6th, 2020, 2:27 pm
Re: Notifications for paused/resumed items
your a mind reader, I was just looking through the source. Thanks for the pointers, its very helpful.
Re: Notifications for paused/resumed items
Indeed so far it's never been needed to hook into that action, so we never build it.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate