safihre wrote:Adding to that: can't we also make the result-code (Fail/Success) available so we can indicate with a different color in the script line if it was successful? Or did I miss that info somewhere in the API?
That is already implemented.
"Exit(1)" is added by SABnzbd while "1" is the exit code returned from my script.
"Failure" is the last output of my script.
"(More)" is added by SABnzbd and links to the script log.
"Retry" is shown because I enabled "User script can flag job as failed"
"» Script exit code is 1" is added by SABnzbd.
I have to admit it looks awkward and somehow broken. I'm not a dev but I'm currently working to get this cleaned up. For sure I'll post my changes. I also noticed another bug. If you click "Retry" and does not specify a "Optional Supplemental NZB" the job immediately fails again with "» Download failed - Not on your server(s)" and all icons and script text is gone except the "down arrow" icon and its popup now just shows which category the movie is in.
So this part of SABnzbd is really in alpha state
As far as I saw in the code the green line is nzo.set_unpack_info and the red line is nzo.fail_msg but I couldn't find something like nzo.success_msg (which would cause a green line where the red line is in the screenshot) so I guess I have to rewrite much more. Maybe keeping the red line but having a general error shown without any return code (eg. "» Script Failed") and additionally a red line above which actually shows the script error but without all the SABnzbd additions like "(More)".