Page 2 of 2
Re: API question, change order of contents in a queue item?
Posted: March 25th, 2011, 2:03 pm
by shypike
sander wrote:
so SAB should inform the user about the rar-status. So: if the rar is not perfect (or the download too slow), notice the viewer (=user) about that.
Like how? The user is watching TV, not SABnzbd's UI.
He/she will notice anyway, I guess

Re: API question, change order of contents in a queue item?
Posted: March 26th, 2011, 3:02 am
by sander
I had a look at the log, and the download/decoding order looks quite good to me:
Code: Select all
2011-03-26 08:37:54,590::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.vol00+01.par2 yenc
2011-03-26 08:40:54,455::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.rar yenc
2011-03-26 08:41:05,356::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r00 yenc
2011-03-26 08:41:14,997::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r01 yenc
2011-03-26 08:41:30,777::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r02 yenc
2011-03-26 08:41:48,092::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r03 yenc
2011-03-26 08:41:56,627::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r04 yenc
2011-03-26 08:42:22,845::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r05 yenc
2011-03-26 08:42:35,250::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r06 yenc
2011-03-26 08:42:43,547::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r07 yenc
2011-03-26 08:42:57,266::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r08 yenc
2011-03-26 08:43:05,620::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r09 yenc
2011-03-26 08:43:15,741::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r10 yenc
2011-03-26 08:43:26,623::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r11 yenc
2011-03-26 08:43:36,703::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.nfo yenc
2011-03-26 08:43:37,074::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r12 yenc
2011-03-26 08:43:51,431::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r13 yenc
2011-03-26 08:43:58,700::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r14 yenc
2011-03-26 08:43:59,222::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.par2 yenc
2011-03-26 08:43:59,234::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.sfv yenc
2011-03-26 08:44:00,804::INFO::[assembler:83] Decoding /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r15 yenc
The stream_unrar starts well, but stops after file 5, probably because SAB has already completed the download, and move the stuff away from 'incomplete'.
Code: Select all
sander@lifebook:~/stream_unrar$ ./stream_unrar -m /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03 -e stream-output
Beginning to monitor watch directories
Extracting /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.rar to stream-output
Waiting for /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r02
/home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r02 found
Waiting for /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r03
/home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r03 found
Waiting for /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r04
/home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r04 found
Waiting for /home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r05
/home/sander/Downloads/incomplete/Oh.Oh.Blabla.S01E03/oob.103-diff.r05 found
sander@lifebook:~/stream_unrar$
Re: API question, change order of contents in a queue item?
Posted: March 26th, 2011, 3:07 am
by sander
shypike wrote:
sander wrote:
so SAB should inform the user about the rar-status. So: if the rar is not perfect (or the download too slow), notice the viewer (=user) about that.
Like how? The user is watching TV, not SABnzbd's UI.
He/she will notice anyway, I guess
I mean: in the Status page of SAB. So that if/when things go wrong on TV, the user can see on SAB why. Otherwise there will be a lot of questions in the forum.
Re: API question, change order of contents in a queue item?
Posted: March 26th, 2011, 3:11 am
by sander
@shypike (and @usenet ?):
Is there a soluton for the problem that the incomplete directory is gone before stream_unrar is finished? I tried pointing Incomplete and Complete to the same directory, but that results in a new directory .1 being created, problably because already exists.
Re: API question, change order of contents in a queue item?
Posted: March 26th, 2011, 3:54 am
by shypike
Streaming isn't supported currently.
There is only an undocumented setting "allow_streaming"
that will prevent each finished job from being post-processed.
Instead it will be flagged as "failed" in the History waiting
for deletion or a PP retry.
Re: API question, change order of contents in a queue item?
Posted: March 26th, 2011, 1:32 pm
by sander
shypike wrote:
Streaming isn't supported currently.
There is only an undocumented setting "allow_streaming"
that will prevent each finished job from being post-processed.
Instead it will be flagged as "failed" in the History waiting
for deletion or a PP retry.
... and it will stay in the incomplete directory?
Re: API question, change order of contents in a queue item?
Posted: March 26th, 2011, 1:34 pm
by shypike
yes
Re: API question, change order of contents in a queue item?
Posted: March 31st, 2011, 3:01 am
by Usenet
shypike wrote:
SABnzbd is already trying to sort it in a streaming-friendly order.
Ignore the fact that the par2 files are at the front.
As soon as the first (and smallest) vol.par file is in, the rest goes to the back of the queue.
Got some news here. Apparently if you set the job to +download, nothing in the file order is changed. But if you set it to +delete, the function is as you describe it.
Back to the queue sorting, is there any way you could use the tapi? Since there is functions in the plush skin to push a individual SABnzbd_nzf_xxxxx to the top. Just couldn't figure out the syntax...
Re: API question, change order of contents in a queue item?
Posted: March 31st, 2011, 4:01 am
by shypike
Usenet wrote:
Got some news here. Apparently if you set the job to +download, nothing in the file order is changed. But if you set it to +delete, the function is as you describe it.
Implicating that the sorting doesn't happen in "streaming mode"?
I'd say that the sorting should be done always. I'll check this.
Usenet wrote:
Back to the queue sorting, is there any way you could use the tapi? Since there is functions in the plush skin to push a individual SABnzbd_nzf_xxxxx to the top. Just couldn't figure out the syntax...
The API's docs aren't great and the template-only party is worse.
If the sorting works properly, there isn't a real need to fiddle with the API, is there?
Re: API question, change order of contents in a queue item?
Posted: March 31st, 2011, 4:10 am
by Usenet
shypike wrote:
Implicating that the sorting doesn't happen in "streaming mode"?
yes,
shypike wrote:
If the sorting works properly, there isn't a real need to fiddle with the API, is there?
No, but when looking at the code it looks like something like "/nzb/SABnzbd_nzo_xxxxx/bulk_operation/?_dc=XXXX&session=XXXX&action_key=nzo-top&SABnzbd_nzf_xxxx=on"....
Re: API question, change order of contents in a queue item?
Posted: March 31st, 2011, 4:28 am
by shypike
I'll check the sorting, it should sort always.
What you show is not the API, but the link-based support for templates.
Not really usable for your purpose.
BTW: the difference between the API and the TAPI is that the
API needs explicit authentication and the TAPI assumes that the browser
has already logged into the UI.
The functionality of the two is identical.
A large part of the interface between the program and the templates is outside the API/TAPI
and cannot be used by external programs.
Re: API question, change order of contents in a queue item?
Posted: March 31st, 2011, 4:29 am
by Usenet
Great, thanks for the clarification!