i created a pre queue script on my Syno DS 209 and used this example ->http://forums.sabnzbd.org/viewtopic.php?t=6885 to change the category if some words are found in the nzb name
Unfortunatly it doesnt work for me :-(
- the pre queue script is choosen in Config -> Switches
- chmod 777 on the script was made
Sabnzb Log File shows this
Code: Select all
[newsunpack:1405] Running pre-queue script ['/volume1/Sabnzb/Scripts/pre-queue-script-test.sh', 'The.Thing.2011.German.AC3D.5.1.720p.BDRiP.XviD-icq4711', '', '', '', '-100', '2919867029', 'alt.binaries.ath alt.binaries.dc alt.binaries.mom alt.binaries.nzm', '', '', '', '']
Code: Select all
#!/bin/sh
#
# NZB set category Script by Mar2zz v0.1
# input (this is what sabnzbd feeds to this script)
# All parameters (except 1) can be empty, meaning a default value.
# 1 : Name of the NZB (no path, no ".nzb")
# 2 : PP (0, 1, 2 or 3)
# 3 : Category
# 4 : Script (no path)
# 5 : Priority (-100, -1, 0 or 1 meaning Default, Low, Normal, High)
# 6 : Size of the download (in bytes)
# 7 : Group list (separated by spaces)
# 8 : Show name
# 9 : Season (1..99)
# 10 : Episode (1..99)
# 11: Episode name
# outputparams (what this script tells sabnzbd)
# The script writes the results to the console, each parameter on a separate line.
# Each parameter (except 1) can be an empty line, meaning the original value.
# 1 : 0=Refuse, 1=Accept
# 2 : Name of the NZB (no path, no ".nzb")
# 3 : PP (0, 1, 2 or 3)
# 4 : Category
# 5 : Script (basename)
# 6 : Priority (-100 -2, -1, 0 or 1, meaning Default, Paused, Low, Normal, High )
# 7 : Group to be used (in case your provider doesn't carry all groups and there are multiple groups in the NZB)
### if a word between *'s is found in the nab file name the category will be changed to the one that's set.
case $1 in
*BLUERAY*)
cat=film
;;
*h264*)
cat=filme
;;
*telesync*)
cat=filme
;;
*x264*)
cat=filme
;;
*XviD*)
cat=filme
;;
*XvID*)
cat=filme
;;
*1080p*)
cat=filme
;;
*DTS*)
cat=filme
;;
*DVD*)
cat=filme
;;
*)
cat=$3
;;
esac
### now tell sab what to do with nzb (note, this must be echoed in specific order, every command on a new line)
echo "1" # tell sab to use this .nzb
echo $1 # keep original name for nzb
echo $2 # keep original pp
echo "$cat" #set category to new if one of the parameters was found
Code: Select all
NAS> ./pre-queue-script-test.sh 'The.Thing.2011.German.AC3D.5.1.720p.BDRiP.XviD-icq4711', '', '', '', '-100', '2919867029', 'alt.binaries.ath alt.binaries.dc alt.binaries.mom alt
.binaries.nzm', '', '', '', ''
1
The.Thing.2011.German.AC3D.5.1.720p.BDRiP.XviD-icq4711,
,
filme