Post-Processing script not activating

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.
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Post-Processing script not activating

Post by Hoox »

I'm trying to run a script each time a download from my TV category completes, but the script never gets started.
The script is a update script for YAMJ (Yet Another Movie Jukebox). It scans my tv download folder for new files and updates YAMJ accordingly. Therefor it does'nt need any parameters.
The script works just fine if I start it directly from terminal.

I'm using SABnzbd+ 0.4.12 on Debian Linux. Same problem on 0.4.11.

I found another post a while back about a problem like this, but no solution was posted.
Anyone got some pointers on what could be wrong?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post-Processing script not activating

Post by shypike »

You did set the X bit of the script (like in "chmod +x script") ?
You coupled the script to the category TV?
Do you see a script selection box in the queue lines?
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

I did set the +x bit and also made it 755.
I tryed to activate the script from 3 different places.
1. Config -> Categories, choose the script for the TV category
2. Config -> RSS, choose the script for the specific RSS feed
3. Queue, choose the script from "On queue finish:"

I was able to choose the script from all the dropdown boxes.
Also logfile does not show anything about the script being run or any errors regarding it.
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

Here is the script:

Code: Select all

#!/bin/sh

cd /usr/bin/myiHomeLinux-v5.2.0/

java -jar runYAMJ.jar

cd /usr/bin/myiHomeLinux-v5.2.0/plugin/moviejukebox/

java -Xms256m -Xmx512m -classpath .:./resources:./lib/moviejukebox.jar:./lib/commons-logging-1.1.1.jar:./lib/commons-lang-2.4.jar:./lib/commons-configuration-1.5.jar:./lib/commons-collections-3.2.1.jar:./lib/filters.jar:./lib/mucommanderlight.jar:./lib/thetvdbapi.jar:./lib/saxon9.jar com.moviejukebox.MovieJukebox myiHome-moviejukebox.xml -o ../../webapps/ROOT/feature/myiHome-moviejukebox
Quite simple, so I don't think the problem is here...
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post-Processing script not activating

Post by shypike »

Check the log file and search for the name of your script.
Maybe it tells you where the problem is.
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

Actually, when I choose the script in the "On queue finish:" it shows something in the log:

Code: Select all

2009-10-10 03:25:22,539::INFO::[postproc] Queue has finished, launching: <function run_script at 0x9859224> (yamj.sh)
However, it doesn't seem like the script has been run. The files for YAMJ has not been updated  ???
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post-Processing script not activating

Post by shypike »

I would first test it with a simple script that does an echo to a known file.
Or run the sample script Sample-PostProc.sh that's part of the distribution.
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

I have done some more testing and got it working, sort of.
I choose the script in the categories setting and added a new RSS filter I knew was present in the current RSS feed. Pressed Force Download and it started downloading and run the script correctly.
I thought it was working for all my filters, but now I see that the script is not being run for any RSS filters that were previously in my feed. Do I have to add all my filters again to make the script run on them also?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post-Processing script not activating

Post by shypike »

We recently removed several bugs concerning RSS and settings behavior for the next major release.
I'm not sure these bugs were also present in 0.4.12.
I'll get back to you.
If feasible, set a default script in Config->Options.
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

shypike wrote: If feasible, set a default script in Config->Options.
If I set a default script in Config->Switches the script is not run either.
As of now, it seems like I will have to re-enter my RSS filters :-\
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post-Processing script not activating

Post by shypike »

I don't understand why you should re-enter your filters.
A correct working SABnzbd would use this priority for scripts:
1. Explicit script for filter
2. Explicit Script for feed
3. Script for category
3. Default script
8th sin
Newbie
Newbie
Posts: 12
Joined: September 25th, 2009, 11:46 pm

Re: Post-Processing script not activating

Post by 8th sin »

not that I think it will make a difference, but I can call YAMJ just by running:

cd /path/to/YAMJ/
./MovieJukebox.sh

Does the script work if you run it manually?
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

8th sin, the script I pasted is just the contents of MovieJukebox.sh. It works fine if I run it manually.
It also works fine if I choose the script for my category and add a RSS filter. But not for my current RSS filters. So far this has been the only working solution.

shypike, I can use this as a solution. You don't have to spend more time on it, unless you want me to test some things in case of a bugfix?
User avatar
shypike
Administrator
Administrator
Posts: 19774
Joined: January 18th, 2008, 12:49 pm

Re: Post-Processing script not activating

Post by shypike »

I can make you a member of the release test group.
The latest alpha should have better handling of scripts in RSS feeds.
Hoox
Release Testers
Release Testers
Posts: 8
Joined: October 9th, 2009, 9:35 am

Re: Post-Processing script not activating

Post by Hoox »

shypike wrote: I can make you a member of the release test group.
The latest alpha should have better handling of scripts in RSS feeds.
I could try that :)
Post Reply