Notifications for paused/resumed items

Get help with all aspects of SABnzbd
Forum rules
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.
Post Reply
FlangeMonkey
Newbie
Newbie
Posts: 11
Joined: July 6th, 2020, 2:27 pm

Notifications for paused/resumed items

Post by FlangeMonkey »

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,
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Notifications for paused/resumed items

Post by sander »

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
FlangeMonkey
Newbie
Newbie
Posts: 11
Joined: July 6th, 2020, 2:27 pm

Re: Notifications for paused/resumed items

Post by FlangeMonkey »

Under testing that option is global pause and resume only, not the individual items/jobs.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Notifications for paused/resumed items

Post by sander »

Ah, yes, correct.
FlangeMonkey
Newbie
Newbie
Posts: 11
Joined: July 6th, 2020, 2:27 pm

Re: Notifications for paused/resumed items

Post by FlangeMonkey »

The only other option I can think of is using websocket, but from my research its not available?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Notifications for paused/resumed items

Post by sander »

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:

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",
See https://sabnzbd.org/wiki/configuration/3.7/api for full details.
FlangeMonkey
Newbie
Newbie
Posts: 11
Joined: July 6th, 2020, 2:27 pm

Re: Notifications for paused/resumed items

Post by FlangeMonkey »

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.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Notifications for paused/resumed items

Post by sander »

If you check sabnzbd.log, you can see this:

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
FlangeMonkey
Newbie
Newbie
Posts: 11
Joined: July 6th, 2020, 2:27 pm

Re: Notifications for paused/resumed items

Post by FlangeMonkey »

:) your a mind reader, I was just looking through the source. Thanks for the pointers, its very helpful.
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Notifications for paused/resumed items

Post by safihre »

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
Post Reply