Email Template $status

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
Eejit
Sr. Member
Sr. Member
Posts: 268
Joined: September 10th, 2008, 5:46 pm

Email Template $status

Post by Eejit »

Version: 0.5.0 Final
OS: Windows 7 Pro
Install-type: Windows Installer
Skin: Default
Firewall Software: Avast
Are you using IPV6? no
Is the issue reproducible? yes

I've just started playing with the email templates and have noticed a possible problem with the $status variable.
It would only seem to be based only on verification stage. Should a job pass the verification, but fail the unpack stage for whatever reason, TRUE is still returned.
This would also appear to be true of the folder renaming. ie _FAILED_ is not given if the unpacking fails due to a password etc.

Unless I misunderstand, which wouldn't be the first time  ;D
Eejit - The name say's it all !!
Image
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Email Template $status

Post by shypike »

The status should be 0, 1, 2 or 3 (OK, failed verification, failed-unrar, failed verification+failed unrar).
But it's not implemented correctly.
It is done right for user scripts but not for email templates.

I'll fix this in  0.5.1.

Looking at the source code, I'd say that the renaming works OK.
However: if you have "pp only verified jobs" off, the "__FAILED__" prefix is always removed,
despite a failed unrar.
This is intentional, although it may not be what you like or expect.
Last edited by shypike on March 16th, 2010, 4:16 am, edited 1 time in total.
Eejit
Sr. Member
Sr. Member
Posts: 268
Joined: September 10th, 2008, 5:46 pm

Re: Email Template $status

Post by Eejit »

Thanks shypike,
I look forward to 0.5.1  :)

The failed prefix is strange as I had "Post-Process Only Verified Jobs" selected.

I'll try with it off, then turn it back on again and check the results.
Eejit - The name say's it all !!
Image
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Email Template $status

Post by shypike »

This is not consistent with what you said earlier.
Given your setting, you will never get a "failed unrar" status,
because SABnzbd will not try to unpack.
Although the code is incorrect, that's not what is causing your observation.

I'll have a look at the renaming issues too.
Eejit
Sr. Member
Sr. Member
Posts: 268
Joined: September 10th, 2008, 5:46 pm

Re: Email Template $status

Post by Eejit »

My nick is just more than a nick  ;)
As I now understand it:
If "Post-Process Only Verified Jobs" is selected, the Failed prefix will never be given for a failed unrar but will be given for failed verification.
If I want the Failed prefix for all failed downloads, from all stages I should leave the "Post-Process Only Verified Jobs" unselected.
I'll have to find an nzb to test.

Cheers
Eejit - The name say's it all !!
Image
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: Email Template $status

Post by shypike »

Testing is easy enough. Just load an NZB and remove enough files from the list :)
Please note that using the sorting options may partially defeat the folder flagging.

BTW: I'm not going to change the code for email $status.
The problem is that it would invert the meaning of $status.
Currently "1" success and "0" is (any) failure.
It will stay this way, I don't think the problem is big enough to invert
the meaning of the $status field.
Post Reply