mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Added Customizable Extarct Directories
As provided by schumi2004 (on QNAP forums), modified by hugbug (on SourceForge) and then edited here to allow writing of the parameters to the .conf files.
This commit is contained in:
parent
242c95ad5e
commit
23fbe0bbc9
4 changed files with 775 additions and 679 deletions
|
@ -8,11 +8,19 @@ UnrarCmd=unrar
|
|||
PythonCmd=/usr/local/python/bin/python
|
||||
|
||||
# Set the full path to sabToSickBeard.py for SickBeard's postprocessing.
|
||||
SabToSickBeard=/usr/local/nzbget/var/sabToSickBeard.py
|
||||
NzbToSickBeard=/usr/local/nzbget/var/nzbToSickBeard.py
|
||||
|
||||
# Set the full path where completed movies should be placed
|
||||
# before CouchPotato's Renamer is called
|
||||
TV_DL_DIR=/usr/local/nzbget/complete/tv
|
||||
|
||||
# Set the full path to nzbToCouchpotato.py for Couchpotato's postprocessing
|
||||
NzbToCouchPotato=/usr/local/nzbget/var/nzbToCouchPotato.py
|
||||
|
||||
# Set the full path where completed movies should be placed
|
||||
# before CouchPotato's Renamer is called
|
||||
MOVIES_DL_DIR=/usr/local/nzbget/complete/movies
|
||||
|
||||
|
||||
##############################################################################
|
||||
### OPTIONS ###
|
|
@ -1,12 +1,13 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This file if part of nzbget
|
||||
#
|
||||
# Example postprocessing script for NZBGet
|
||||
#
|
||||
# Copyright (C) 2008 Peter Roubos <peterroubos@hotmail.com>
|
||||
# Copyright (C) 2008 Otmar Werner
|
||||
# Copyright (C) 2008-2009 Andrei Prygounkov <hugbug@users.sourceforge.net>
|
||||
# Copyright (C) 2008-2012 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
||||
# Copyright (C) 2012 Antoine Bertin <diaoulael@gmail.com>
|
||||
# Copyright (C) 2012 Jürgen Seif <thor78@gmx.at>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -20,7 +21,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
#
|
||||
|
||||
|
@ -63,7 +64,6 @@
|
|||
####################### End of Usage instructions #######################
|
||||
|
||||
|
||||
|
||||
# NZBGet passes following arguments to postprocess-programm as environment
|
||||
# variables:
|
||||
# NZBPP_DIRECTORY - path to destination dir for downloaded files;
|
||||
|
@ -96,7 +96,6 @@ POSTPROCESS_SUCCESS=93
|
|||
POSTPROCESS_ERROR=94
|
||||
POSTPROCESS_NONE=95
|
||||
|
||||
|
||||
# Check if the script is called from nzbget
|
||||
if [ "$NZBPP_DIRECTORY" = "" -o "$NZBOP_CONFIGFILE" = "" ]; then
|
||||
echo "*** NZBGet post-process script ***"
|
||||
|
@ -316,14 +315,51 @@ if [ "$RenameIMG" = "yes" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$SabToSickBeard" ]; then
|
||||
############################
|
||||
### BEGIN CUSTOMIZATIONS ###
|
||||
############################
|
||||
|
||||
# Move categories to /share/yourdirectory and remove download destination directory
|
||||
if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then
|
||||
echo "[INFO] Post-Process: Moving TV shows to $TV_DL_DIR"
|
||||
cp -R "$NZBPP_DIRECTORY" "$TV_DL_DIR" >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "[ERROR] Post-Process: Moving to $TV_DL_DIR"
|
||||
exit $POSTPROCESS_ERROR
|
||||
else
|
||||
rm -fr *
|
||||
cd ..
|
||||
rmdir "$NZBPP_DIRECTORY"
|
||||
NZBPP_DIRECTORY="$TV_DL_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" ]; then
|
||||
echo "[INFO] Post-Process: Moving Movies to $MOVIES_DL_DIR"
|
||||
cp -R "$NZBPP_DIRECTORY" "$MOVIES_DL_DIR" >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "[ERROR] Post-Process: Moving to $MOVIES_DL_DIR"
|
||||
exit $POSTPROCESS_ERROR
|
||||
else
|
||||
rm -fr *
|
||||
cd ..
|
||||
rmdir "$NZBPP_DIRECTORY"
|
||||
NZBPP_DIRECTORY="$MOVIES_DL_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################
|
||||
### END CUSTOMIZATIONS ###
|
||||
##########################
|
||||
|
||||
if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$NzbToSickBeard" ]; then
|
||||
# Call SickBeard's postprocessing script
|
||||
echo "[INFO] Post-Process: Running SickBeard's postprocessing script"
|
||||
$PythonCmd $SabToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
||||
$PythonCmd $NzbToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "$CouchPotato" = "yes" -a "$NZBPP_CATEGORY" = "$CouchPotatoCategory" -a -e "$NzbToCouchPotato" ]; then
|
||||
# Call Couchpotato's postprocessing script
|
||||
# Call CouchPotato's postprocessing script
|
||||
echo "[INFO] Post-Process: Running CouchPotato's postprocessing script"
|
||||
$PythonCmd $NzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
||||
fi
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# Copyright (C) 2008 Peter Roubos <peterroubos@hotmail.com>
|
||||
# Copyright (C) 2008 Otmar Werner
|
||||
# Copyright (C) 2008-2012 Andrey Prygunkov <hugbug@users.sourceforge.net>
|
||||
# Copyright (C) 2012 Jürgen Seif <thor78@gmx.at>
|
||||
# Copyright (C) 2012 Antoine Bertin <diaoulael@gmail.com>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
@ -34,13 +34,20 @@
|
|||
# PostProcess=/home/user/nzbget/nzbget-postprocess.sh
|
||||
#
|
||||
# o The script needs a configuration file. An example configuration file
|
||||
# is provided in file "nzbget-postprocess.conf". Put the configuration file
|
||||
# into the directory where nzbget's configuration file (nzbget.conf) is located.
|
||||
# Then edit the configuration file in any text editor to adjust the settings.
|
||||
# is provided in file "postprocess-example.conf". Put the configuration file
|
||||
# into the directory where nzbget's configuration file (nzbget.conf) or where
|
||||
# this script itself is located. Then edit the configuration file in any
|
||||
# text editor to adjust the settings.
|
||||
#
|
||||
# o You can also edit the script's configuration via web-interface.
|
||||
# o You can also edit the script's configuration via web-interface (requires
|
||||
# NZBGetWeb 1.4 or later). Set the options "PostProcessConfigFile" and
|
||||
# "PostProcessConfigTemplate" to point to "postprocess-example.conf"
|
||||
# (including full path). The both options are under the section
|
||||
# "CONFIGURATION OF POSTPROCESSING-SCRIPT" in NZBGetWeb.
|
||||
#
|
||||
# o There are few options, which can be ajdusted for each nzb-file individually.
|
||||
# o There are few options, which can be ajdusted for each nzb-file
|
||||
# individually. To view/edit them in web-interface click on a spanner icon
|
||||
# near the name of nzb-file.
|
||||
#
|
||||
# o The script supports the feature called "delayed par-check".
|
||||
# That means it can try to unpack downloaded files without par-checking
|
||||
|
@ -308,14 +315,51 @@ if [ "$RenameIMG" = "yes" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$SabToSickBeard" ]; then
|
||||
############################
|
||||
### BEGIN CUSTOMIZATIONS ###
|
||||
############################
|
||||
|
||||
# Move categories to /share/yourdirectory and remove download destination directory
|
||||
if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then
|
||||
echo "[INFO] Post-Process: Moving TV shows to $TV_DL_DIR"
|
||||
cp -R "$NZBPP_DIRECTORY" "$TV_DL_DIR" >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "[ERROR] Post-Process: Moving to $TV_DL_DIR"
|
||||
exit $POSTPROCESS_ERROR
|
||||
else
|
||||
rm -fr *
|
||||
cd ..
|
||||
rmdir "$NZBPP_DIRECTORY"
|
||||
NZBPP_DIRECTORY="$TV_DL_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" ]; then
|
||||
echo "[INFO] Post-Process: Moving Movies to $MOVIES_DL_DIR"
|
||||
cp -R "$NZBPP_DIRECTORY" "$MOVIES_DL_DIR" >/dev/null 2>&1
|
||||
if [ "$?" -ne 0 ]; then
|
||||
echo "[ERROR] Post-Process: Moving to $MOVIES_DL_DIR"
|
||||
exit $POSTPROCESS_ERROR
|
||||
else
|
||||
rm -fr *
|
||||
cd ..
|
||||
rmdir "$NZBPP_DIRECTORY"
|
||||
NZBPP_DIRECTORY="$MOVIES_DL_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################
|
||||
### END CUSTOMIZATIONS ###
|
||||
##########################
|
||||
|
||||
if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$NzbToSickBeard" ]; then
|
||||
# Call SickBeard's postprocessing script
|
||||
echo "[INFO] Post-Process: Running SickBeard's postprocessing script"
|
||||
$PythonCmd $SabToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
||||
$PythonCmd $NzbToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
if [ "$CouchPotato" = "yes" -a "$NZBPP_CATEGORY" = "$CouchPotatoCategory" -a -e "$NzbToCouchPotato" ]; then
|
||||
# Call Couchpotato's postprocessing script
|
||||
# Call CouchPotato's postprocessing script
|
||||
echo "[INFO] Post-Process: Running CouchPotato's postprocessing script"
|
||||
$PythonCmd $NzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
||||
fi
|
||||
|
|
|
@ -33,10 +33,18 @@ UnrarCmd=unrar
|
|||
PythonCmd=/usr/local/python/bin/python
|
||||
|
||||
# Set the full path to sabToSickBeard.py for SickBeard's postprocessing.
|
||||
SabToSickBeard=/opt/share/nzbget/scripts/sabToSickBeard.py
|
||||
NzbToSickBeard=/usr/local/nzbget/var/nzbToSickBeard.py
|
||||
|
||||
# Set the full path where completed movies should be placed
|
||||
# before CouchPotato's Renamer is called
|
||||
TV_DL_DIR=/usr/local/nzbget/complete/tv
|
||||
|
||||
# Set the full path to nzbToCouchpotato.py for Couchpotato's postprocessing
|
||||
NzbToCouchPotato=/opt/share/nzbget/scripts/nzbToCouchPotato.py
|
||||
NzbToCouchPotato=/usr/local/nzbget/var/nzbToCouchPotato.py
|
||||
|
||||
# Set the full path where completed movies should be placed
|
||||
# before CouchPotato's Renamer is called
|
||||
MOVIES_DL_DIR=/usr/local/nzbget/complete/movies
|
||||
|
||||
##############################################################################
|
||||
### OPTIONS ###
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue