On finish script

Report & discuss bugs found in 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
elluce
Newbie
Newbie
Posts: 5
Joined: November 27th, 2013, 9:24 pm

On finish script

Post by elluce »

Hello,

I have Sabnzbd 0.7.16 installed on Windows XP. I have created a script in bat file that acquires subs. Everything is fine when script is associated with category. Every job with given category ends with my script. Now, I don't want to run this script after each job. It would be better to run it once when queue is empty. So, I have chosen my script in "On finish" tab. Unfortunately nothing happens when queue becomes empty ;-(. Is "On finish" OK in this version of sabnzbd or I am doing something wrong? Thanks in advance ;-)

elluce

P.S.
It's not really a script. It is basic Windows batch. Name of the file is subs.cmd and it looks like this:

@echo on
cd "C:\Documents and Settings\elluce\Local Settings\Application Data\Sublight\App>"
c:
SublightCmd.exe batch "d:\grabit\downloads\seriale\\" "*.avi;*.mkv;*.mp4" "en" /recursive:true /smartdownload:true /skipRecentlySearched:false /username:"xxxxx" /password:"xxxxx"
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: On finish script

Post by jcfp »

Start by checking the logs to see if the script gets executed; set logging level to 'debug' if necessary. And then there's part 2: does the script actually work. Some subtitle services went offline recently, most notably bierdopje.
elluce
Newbie
Newbie
Posts: 5
Joined: November 27th, 2013, 9:24 pm

Re: On finish script

Post by elluce »

Hello,

sadly, I know about bierdopje. That is the reason of dealing with this script. I am trying to get as close as possible to my previous solution auto-sub + bierdopje.
I have checked everything and it's like this:
When I add the job from RSS and manualy set script - everything works perfect.
Image
Image

When I assign script to the category - nothing happens.
Image
What is more, category of the download is recognized but script is not set ;-(.
Image

When I set script On finish - nothing happens either.
Image

On the other hand log says that script is called. Why it works only when manually set - that I don't know. If you are willing to help me I can send you my log.

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

Re: On finish script

Post by shypike »

I think you're mixing up things.
There's a per-job script coupled to the category.
There's also an end-script that's only called when the last job in the queue is finished.
The one in the drop-down menu in your screenshot is the end-script.
elluce
Newbie
Newbie
Posts: 5
Joined: November 27th, 2013, 9:24 pm

Re: On finish script

Post by elluce »

I have only one script. It works only when chosen per job. I want it to work "when the last job in the queue is finished". According to log it is called at the end of queue but I do not see the results. I can only see the results when chosen per job.
User avatar
shypike
Administrator
Administrator
Posts: 19773
Joined: January 18th, 2008, 12:49 pm

Re: On finish script

Post by shypike »

Be aware that the end-of-queue script gets different parameters than the end-of-job one.
In fact, the end-of-queue gets no parameters at all.
elluce
Newbie
Newbie
Posts: 5
Joined: November 27th, 2013, 9:24 pm

Re: On finish script

Post by elluce »

Could you elaborate, please? I have checked my "script" by attaching it to a job. It is working. So, I thought that it will work the same way when attached to an end of queue. Apparently that's not the case :-(.
User avatar
jcfp
Release Testers
Release Testers
Posts: 1032
Joined: February 7th, 2008, 12:45 pm

Re: On finish script

Post by jcfp »

See http://wiki.sabnzbd.org/user-scripts for the info passed on to post-processing scripts when called as part of a specific download job. Since all this info is different for every job, none of it can be supplied for a script called at end-of-queue. That means your script will only work at end-of-queue if it doesn't depend on sab for info, such as the place(s) to look for files.
elluce
Newbie
Newbie
Posts: 5
Joined: November 27th, 2013, 9:24 pm

Re: On finish script

Post by elluce »

I have been there. As far as I am concerned, it could be in Chinese ;-))). Thanks anyway. I will try to find someone who will write appropriate script for me.
Post Reply