Page 1 of 1

More SABNZBD support in the new beta!

PostPosted: Tue Apr 16, 2019 3:00 pm
by Biship
Can you please update your sabnzbd API for the queue API call:
https://github.com/theotherp/nzbhydra2/issues/363
https://sabnzbd.org/wiki/advanced/api#queue
Then I can continue to tell reddit users Newsbin works with Radaar/Sonaar/Lidaar/NZBHydra when someone asks for a good automated nzb downloader :)
I am willing & able to test a new beta build.

Re: More SABNZBD support in the new beta!

PostPosted: Tue Apr 16, 2019 7:51 pm
by Quade
Newsbin already does "queue" so I'm not really sure what you're asking for.

Re: More SABNZBD support in the new beta!

PostPosted: Tue Apr 16, 2019 9:15 pm
by Biship
What newsbin currently returns is only a small amount of what mode=queue can return.

http://htpc:8999/api?apikey=<key>&mode=queue
Code: Select all
{
    "queue": {
        "paused": false,
        "size": "0 B",
        "version": "2.3.5",
        "my_home": "H:\\Newsbin\\",
        "status": "Downloading",
        "categories": [
            "*",
            "anime",
            "tv"
        ],
        "slots": [],
        "noofslots": 0
    }
}

(slots never currently populates)

I understand if you do not wish to implement the full API, but if you check that github issue I linked, you'll see what NZBHyrda is looking for.
it's only a few values of the queue and items in the queue.

Re: More SABNZBD support in the new beta!

PostPosted: Tue Apr 16, 2019 9:58 pm
by Quade
Slots populate if you have something in the download list from NZB's. It won't show downloads that don't have NZB's since they couldn't have come from Sonarr. "history" is the historical record of downloads that completed or failed.

Sonarr wouldn't work if queue and history didn't work because it could never read status over the link. At one point Sonarr would only pay attention to NZB's it supplied too. It's a moving target so I can't say that's how it's doing it today.

Re: More SABNZBD support in the new beta!

PostPosted: Tue Apr 16, 2019 10:04 pm
by Biship
ok, I wasn't testing with a download from a NZB.

I'll go find out which fields are wrong.
I thought it might be obvious to you from the link.

Code: Select all
{
    "queue": {
        "paused": false,
        "size": "0 B",
        "version": "2.3.5",
        "my_home": "I:\\NewsbinData\\",
        "status": "Downloading",
        "categories": [
            "*",
            "anime",
            "tv"
        ],
        "slots": [
            {
                "status": "downloading",
                "index": 1,
                "nzo_id": "660472",
                "password": "",
                "script": "None",
                "has_rating": false,
                "mb": "28822",
                "filename": "(005_146)_-__Saison_2019_Formel_1_Vorsaison_Tests_2._Tag_Session_2.part002.rar__-_27_06_GB",
                "priority": "Normal",
                "cat": "tv",
                "mbleft": "28822",
                "percentage": "0",
                "sizeleft": "30.22 GB",
                "size": "30.22 GB",
                "unpackopts": "3",
                "missing": 0,
                "eta": "unknown",
                "timeleft": "00:10:00"
            }
        ],
        "noofslots": 1
    }
}

Re: More SABNZBD support in the new beta!

PostPosted: Tue Apr 16, 2019 10:20 pm
by Quade
I thought it might be obvious to you from the link.


I don't plan on adding any fields that Sonarr doesn't use but I'm fine adding ones it does use.

https://sabnzbd.org/wiki/advanced/api#queue

Is where I'm looking.

Re: More SABNZBD support in the new beta!

PostPosted: Wed Apr 17, 2019 2:28 pm
by Biship
Needed by NZBHydra and missing from Newsbin's queue output:

queue:kbpersec
queue:mbleft
queue:timeleft

Can you please add these?
(note these are on the queue root level, not from within the queue:slots array)

Re: More SABNZBD support in the new beta!

PostPosted: Thu Apr 18, 2019 2:16 am
by Quade
Unless I'm missing something "time left" and "mbleft" are already in the dump.

https://github.com/theotherp/nzbhydra2/issues/363

Re-reading this post earlier, I see what's going on now. I can look into kbpersec. If I have that maybe I can estimate the timeleft too.

Re: More SABNZBD support in the new beta!

PostPosted: Sat Apr 20, 2019 10:08 am
by Quade
I've added the fields. Only testing will tell if the numbers match what the feeder software is looking for. The speed is correct though. I think "size" and "mb" need to be the total size of the download list which is currently isn't.

I'm also a step away from having category support working. I just need to figure out how to store this information in the download list database.

Re: More SABNZBD support in the new beta!

PostPosted: Sat Apr 20, 2019 11:10 am
by Biship
Great, thanks. I can run a test version and see if nzbhydra2 gets what is expected.