Sync the history and queue

Want something added? Ask for it here.
Post Reply
Malkavian
Newbie
Newbie
Posts: 2
Joined: January 15th, 2010, 3:38 am

Sync the history and queue

Post by Malkavian »

I am making a program that can upload, track and move downloads for multiple users. It does this by using the 5.0 API.
The problem I am having is that the download can be 'lost' when it is moved from the queue to the history.
I would like to see that the download is always in either the queue or the history. This would also mean a new API call to get both queue and history in 1 command to prevent duplicate items.

Thanx
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Sync the history and queue

Post by shypike »

Long term issue, cannot be done in the current design.
Malkavian
Newbie
Newbie
Posts: 2
Joined: January 15th, 2010, 3:38 am

Re: Sync the history and queue

Post by Malkavian »

Ok that is too bad, but I can work around it.
But would the one command for both the queue and the history be possible?
That would save some time if a third party needs both.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Sync the history and queue

Post by shypike »

I think the design is cleaner if they are separate.
yoppybt
Newbie
Newbie
Posts: 3
Joined: May 9th, 2008, 4:03 pm

Re: Sync the history and queue

Post by yoppybt »

I have made a simple application that monitors SABnzbd's progress.
It now always must make two requests: one for the status of active jobs and another one for the history to find jobs that are being verified, repaired or unpacked.

I can understand that the current design is cleaner. However what bothers me most is the length of the history. Although I am only interested in the active jobs I must download the entire history which grows over time.

Of course I purge the history every now and then but it would be nice if there were for example an extra parameter &activeonly=1 when requesting the history that would only return the active 'slots' in the history.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Sync the history and queue

Post by shypike »

I see that the documentation is a bit incomplete.
This is the full history API call (same for queue):

Code: Select all

api?mode=history&output=xml&start=START_POS&limit=MAX_AMOUNT
yoppybt
Newbie
Newbie
Posts: 3
Joined: May 9th, 2008, 4:03 pm

Re: Sync the history and queue

Post by yoppybt »

Excellent, works like a charm. Thank you for the quickest 'fix' ever :D
Post Reply