Page 1 of 2
Post-Processing script not activating
Posted: October 9th, 2009, 9:46 am
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?
Re: Post-Processing script not activating
Posted: October 9th, 2009, 9:52 am
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?
Re: Post-Processing script not activating
Posted: October 9th, 2009, 10:21 am
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.
Re: Post-Processing script not activating
Posted: October 9th, 2009, 10:26 am
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...
Re: Post-Processing script not activating
Posted: October 9th, 2009, 3:41 pm
by shypike
Check the log file and search for the name of your script.
Maybe it tells you where the problem is.
Re: Post-Processing script not activating
Posted: October 10th, 2009, 2:17 am
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
Re: Post-Processing script not activating
Posted: October 10th, 2009, 9:46 am
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.
Re: Post-Processing script not activating
Posted: October 12th, 2009, 1:42 am
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?
Re: Post-Processing script not activating
Posted: October 12th, 2009, 2:25 am
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.
Re: Post-Processing script not activating
Posted: October 13th, 2009, 3:07 am
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
Re: Post-Processing script not activating
Posted: October 13th, 2009, 6:15 am
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
Re: Post-Processing script not activating
Posted: October 13th, 2009, 6:32 am
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?
Re: Post-Processing script not activating
Posted: October 13th, 2009, 1:27 pm
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?
Re: Post-Processing script not activating
Posted: October 14th, 2009, 2:08 am
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.
Re: Post-Processing script not activating
Posted: October 14th, 2009, 2:48 am
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