Page 1 of 1

More info in the Status script?

Posted: March 25th, 2008, 5:29 pm
by FlyveHest
Hi,

As I am almost finished with a new Windows-based SABnzbd monitor script, I was wondering if it would be possible to add some more information to the Status script (http://localhost:8080/sabnzbd/api?mode=qstatus)

I think it would be nice if a repair and unpacking status could be added, so, if something is being either repaired or unpacked, a user would be able to get information about this.

Something along the lines of

Code: Select all

<repairing>True/False</repairing>
<repairingfile>FILENAME HERE</repairingfile>
<repairstatus>STATUS</repairstatus>
and

Code: Select all

<unpacking>True/False</unpacking>
<unpackingfile>FILENAME HERE</unpackingfile>
<unpackstatus>STATUS</unpackstatus>
I don't know how much information you can supply for the status, or if it makes sense to make more than one statusfield (for instance, if its possible to tell that SAB is on file X of Y), so the above is just my shots in the dark, and quite possibly you are able to supply more information.

I'm guessing that I could get the information by scraping http://localhost:8080/sabnzbd/history/ but it would be much nicer (and template independent / futureproof), if it could be contained in the status XML.

Re: More info in the Status script?

Posted: March 25th, 2008, 6:21 pm
by switch
I've actually just added another xml feed today similar to qstatus that includes history items while they are being unpacked/verified ect. All items include a tag that shows the status of the download such as "Queued" "Downloading" "Verfying..." "Unpacking..." "Moving...".

It can also be added to show "Completed" and "Failed" for history items, although the main use for this is in a seperate xml feed for the history.

It's purpose is for something in 0.5.0 but I could probably finalize it for one of the next versions.

For now you can scrape some of the data from the RSS feed of the history.

Re: More info in the Status script?

Posted: March 26th, 2008, 4:46 am
by FlyveHest
Very nice, i'll have a look at scraping the history, and will be looking forward to this feature being added.

Re: More info in the Status script?

Posted: March 26th, 2008, 12:51 pm
by Weavus
switch wrote:It's purpose is for something in 0.5.0 but I could probably finalize it for one of the next versions.
Please do, that sounds fantastic...

Re: More info in the Status script?

Posted: March 29th, 2008, 11:02 am
by FlyveHest
Also, would it be possible to include the job ID (for instance, SABnzbd_nzo_pveq7s) for each job?

It would make handling the jobs OH so much easier :)