I just did a clean install of nzbget on a new LinkStation Pro, all is working except post-processing perl scripts are seemingly skipped. Not sure why?
Printable View
I just did a clean install of nzbget on a new LinkStation Pro, all is working except post-processing perl scripts are seemingly skipped. Not sure why?
Didn't it even say "Executing post-process-script for..."?
Can you please test with binary "0.4.1-r185-testing" from sourceforge? And if it still does not work, then with "0.4.1-r178-testing", which already worked for you, just for test.
The first feature for version 0.5.0 is now implemented and available for testing (release "0.5.0-r191" in package "nzbget-testing").
About categories:
- each nzb-file can have a category assiged to it;
- for each category nzbget will create a subfolder under dst-directory (option <AppendCategoryDir>);
- incoming-directory can have subdirectories (one level of nesting, isn't enough?); by uploading a nzb-file to the subdirectory, the file is automatically categorized;
- new command-line switch <-K> used with switch <-A> to set the category by adding of new nzb-file to queue;
- new subcommand <K> in command-line-switch <-E> to change the category of existing group;
- new parameter to post-process-scripts;
- new parameter in XML-/JSON-RPC-command <editqueue>;
- automatic moving of already downloaded files after the changing of category.
There is also a new version of web-interface with ability to change the category (release "1.1-2" in package "web-interface-testing").
Appreciate any feedback.
Hi all,
Thanks for this topic, NZBGet is a GREAT alternative to sabnzbd.
Currently I'm using the following post-processing script:
But there's an issue with the 'declare' in rule 27... what can I do about this? Or if anyone has a working post-process script to unrar and clean up files, post it here, it seems there are more people interested!Code:#!/bin/sh
# 1 - path to destination dir, where downloaded files are located;
# 2 - name of nzb-file processed;
# 3 - name of par-file processed (if par-checked) or empty string (if not);
# 4 - result of par-check:
# 0 - not checked: par-check disabled or nzb-file does not contain any
# par-files;
# 1 - checked and failed to repair;
# 2 - checked and sucessfully repaired;
# 3 - checked and can be repaired but repair is disabled;
# 5 - state of nzb-job:
# 0 - there are more collections in this nzb-file queued;
# 1 - this was the last collection in nzb-file;
# 6 - indication of failed par-jobs for current nzb-file:
# 0 - no failed par-jobs;
# 1 - current par-job or any of the previous par-jobs for the
# same nzb-files failed;
Sendmail=False
from=MyBook@isp.com
sendto=ReMiA@isp.com
server=mail.isp.com
nzbdir=/tmp/harddisk/torrent/target/
UNRAR=True
declare -a RARFILES
dir=$1
dest=/tmp/harddisk/torrent/target/
PauseServer=True
if [ "$5" = "1" ]
then
chmod -R 766 "$1"
subject="Download of $1 completed"
if [ "$4" = "0" ] ; then
echo "PAR2 not checked: par-check disabled or nzb-file does not contain any par-files" > "$nzbdir/message.txt"
elif [ "$4" = "1" ] ; then
echo "PAR2 checked and failed to repair" > "$nzbdir/message.txt"
elif [ "$4" = "2" ] ; then
echo "PAR2 checked and sucessfully repaired" > "$nzbdir/message.txt"
elif [ "$4" = "3" ] ; then
echo "PAR2 checked and can be repaired but repair is disabled" > "$nzbdir/message.txt"
elif [ "$4" = "" ] ; then
echo "No PAR2 returncode" > "$nzbdir/message.txt"
fi
if [ -f "$1/_brokenlog.txt" ] ; then
echo >> "$nzbdir/message.txt"
echo "Broken Files:" >> "$nzbdir/message.txt"
cat "$1/_brokenlog.txt" >> "$nzbdir/message.txt"
fi
fi
if [ $UNRAR = "True" ] ; then
# PAUSE Server
if [ $PauseServer = "True" ] ; then
/opt/bin/nzbget -P
fi
cd "$dir"
RARFILES=(`ls | grep -E [.][pP][Aa][Rr][Tt][0]*[1][.][Rr][Aa][Rr] | tr ' ' '§'`)
number_rar=${#RARFILES[*]}
if [ $number_rar -ge 1 ] ; then
for b in "${RARFILES[@]}"
do
rar=${b//§/ }
f=${rar/[.][pP][Aa][Rr][Tt][01]*[.][Rr][Aa][Rr]/}
destdir=$dest$f
mkdir "$destdir"
unrar x -y -o- -p- "$rar" "$destdir"
echo "UNRARRED $rar to $destdir" >> "$nzbdir/message.txt"
done
else
RARFILES=(`ls | grep -E [.][Rr][Aa][Rr] | tr ' ' '§'`)
number_rar=${#RARFILES[*]}
if [ $number_rar -ge 1 ] ; then
for b in "${RARFILES[@]}"
do
rar=${b//§/ }
f=${rar/[.][Rr][Aa][Rr]/}
destdir=$dest$f
mkdir "$destdir"
unrar x -y -o- -p- "$rar" "$destdir"
echo "UNRARRED $rar to $destdir" >> "$nzbdir/message.txt"
done
fi
chmod -R 766 "$destdir"
fi
# UN-Pause server
if [ $PauseServer = "True" ] ; then
/opt/bin/nzbget -U
fi
fi
if [ $Sendmail = "True" ] ; then
sendEmail -t $sendto -f $from -u $subject -s $server -o message-file="$nzbdir/message.txt" -q
fi
exit 0
The following script is used on popcornhour box.
It was not designed to be easily portable, so you need to change the absolute paths.
My observations:Code:#!/bin/sh
DownloadDir="$1"
NzbFile="$2"
ParCheck=$4
NzbState=$5
ParFail=$6
# Make a logfile
log="$DownloadDir"/unrar.log
export PATH=$PATH:/opt/sybhttpd/localhost.drives/HARD_DISK/Download
# Check if all is downloaded and repaired
if [ "$NzbState" -eq 1 -a "$ParCheck" -eq 2 -a "$ParFail" -eq 0 ]
then
cd "$DownloadDir"
# Make a temporary directory to store the unrarred files
mkdir extracted
# Remove the Par files
rm *.[pP][aA][rR]2
# Pause NZBGet download until script finishes
/mnt/syb8634/bin/nzbget -P -c /opt/sybhttpd/localhost.drives/HARD_DISK/.nzbget/nzbget.conf
# Unrar the files (if any) to the temporary directory, if there are no rar files this will do nothing
if (ls *.rar >/dev/null)
then
/mnt/syb8634/bin/unrar x -y -p- -o+ "*.rar" ./extracted/
fi
# Remove the rar files (Temporaly disabled just remove # to activate it)
# rm *.r[0-9][0-9]
# rm *.rar
# rm *.s[0-9][0-9]
# Go to the temp directory and try to unrar again.
# If there are any rars inside the extracted rars then these will no also be unrarred
cd extracted
if (ls *.rar >/dev/null)
then
/mnt/syb8634/bin/unrar x -y -p- -o+ "*.rar"
fi
# Delete the Rar files (Temporaly disabled just remove # to activate it)
# rm *.r[0-9][0-9]
# rm *.rar
# rm *.s[0-9][0-9]
# Move everything back to the Download folder
mv * ..
cd ..
# Clean up the temp folder
rmdir extracted
chmod -R a+rw .
rm *.nzb
rm *.1
# Rename img file to iso so the NMT can read it
# It will be renamed to .img.iso so you can see that it has been renamed
if (ls *.img >/dev/null)
then
imgname=`find . -name "*.img" |awk -F/ '{print $NF}'`
mv $imgname $imgname.iso
fi
# Unpause NZBGet
/mnt/syb8634/bin/nzbget -U -c /opt/sybhttpd/localhost.drives/HARD_DISK/.nzbget/nzbget.conf
fi
#################
- the command "export PATH=$PATH:/opt/sybhttpd/localhost.drives/HARD_DISK/Download" is probably not needed;
- the commands to pause/unpause are optional, you may comment them out to allow nzbget download files during unraring.
That script actually works, I've tested it on popcornhour. It should work on asus as well.
The script was written by Philos and Werner from pocornhour forum. See that thread.
I understand, I know that it should work, but my log says:
Quote:
Thu Jul 31 18:26:07 2008 DETAIL Post-Process: /tmp/harddisk/torrent//.nzb/scripts/myscript.sh: /tmp/harddisk/torrent//.nzb/scripts/myscript.sh: 27: declare: not found
Thu Jul 31 18:26:07 2008 DETAIL Post-Process: /tmp/harddisk/torrent//.nzb/scripts/myscript.sh: /tmp/harddisk/torrent//.nzb/scripts/myscript.sh: 60: Syntax error: "(" unexpected (expecting "fi")
OK, I'll test it on asus.
cool, thanks for your effort!
This script (formatted version to view in browser, download link) works on asus. I tested it.
working great, thanks for the tip!
I also like the clean-up feature (added some of my own stuff to it as well).
Testing-version can be downloaded from SourceForge.
Hi all,
Since we are on an asus forum here, I wonder if anyone has succeeded to install newer nzbget versions on the Asus box. Command ikpg list only offers version 0.2.3-1 which installs perfectly but doesnot seem to work with nzbget-web. I tried installing newer versions 0.4.x-x but this fails since version 0.4 has some additional dependencies (libpar2, libncurses). I tried to find ipk packages for Olegs optware but didn't find them sofar. Is there somebody who knows where to find libpar2 and libncurses that work with the asus optware?
You need to install oleg firmware and set ipkg-path to oleg-branch of optware repository.
Detailed how to.
After that you should be able to install the latest stable version of nzbget (0.4.1) with "ipkg install nzbget".
Thanks Hugbug,
pointing to the right package library did the job and everything works fine now.:D
For more please visit nzbget forum.
To upgrade installed version:
Code:ipkg update
ipkg upgrade nzbget