mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Merge pull request #10 from schumi2004/master
CPS failed downloading nzbget 9.0
This commit is contained in:
commit
37b1bd1fd2
3 changed files with 43 additions and 17 deletions
|
@ -122,7 +122,7 @@ def process(dirName, nzbName=None, status=0):
|
||||||
break
|
break
|
||||||
|
|
||||||
if n == 0:
|
if n == 0:
|
||||||
print "cound not find a mvie in the database for release", nzbName1
|
print "cound not find a movie in the database for release", nzbName1
|
||||||
print "please manually ignore this release and refresh the wanted movie"
|
print "please manually ignore this release and refresh the wanted movie"
|
||||||
print "exiting postprocessing script"
|
print "exiting postprocessing script"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
|
@ -164,6 +164,18 @@ if [ "$NZBPP_PARSTATUS" -eq 1 -o "$NZBPP_PARSTATUS" -eq 3 -o "$NZBPP_PARFAILED"
|
||||||
echo "[WARNING] Post-Process: Par-check successful, but Par-repair disabled, exiting"
|
echo "[WARNING] Post-Process: Par-check successful, but Par-repair disabled, exiting"
|
||||||
else
|
else
|
||||||
echo "[WARNING] Post-Process: Par-check failed, exiting"
|
echo "[WARNING] Post-Process: Par-check failed, exiting"
|
||||||
|
# Send notifications to SickBeard or CouchPotato that Par-check failed
|
||||||
|
# Uncomment if SickBeard Branch is fixed
|
||||||
|
#if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$SabToSickBeard" ]; then
|
||||||
|
# # Call SickBeard's postprocessing script
|
||||||
|
# echo "[INFO] Post-Process: Running SickBeard's postprocessing script to notify Par-check failed"
|
||||||
|
#$PythonCmd $SabToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "" "" "" "" "1" >/dev/null 2>&1
|
||||||
|
#fi
|
||||||
|
if [ "$CouchPotato" = "yes" -a "$NZBPP_CATEGORY" = "$CouchPotatoCategory" -a -e "$nzbToCouchPotato" ]; then
|
||||||
|
# Call CouchPotato's postprocessing script
|
||||||
|
echo "[INFO] Post-Process: Running CouchPotato's postprocessing script to notify Par-check failed"
|
||||||
|
$PythonCmd $nzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "" "" "" "" "1" >/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
exit $POSTPROCESS_ERROR
|
exit $POSTPROCESS_ERROR
|
||||||
fi
|
fi
|
||||||
|
@ -226,6 +238,18 @@ if (ls *.rar >/dev/null 2>&1); then
|
||||||
if (ls *.[pP][aA][rR]2 >/dev/null 2>&1); then
|
if (ls *.[pP][aA][rR]2 >/dev/null 2>&1); then
|
||||||
echo "[INFO] Post-Process: Requesting par-repair"
|
echo "[INFO] Post-Process: Requesting par-repair"
|
||||||
exit $POSTPROCESS_PARCHECK_ALL
|
exit $POSTPROCESS_PARCHECK_ALL
|
||||||
|
# Send notifications to SickBeard or CouchPotato that unrar (second pass) failed
|
||||||
|
# Uncomment if SickBeard Branch is fixed
|
||||||
|
#if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$SabToSickBeard" ]; then
|
||||||
|
# # Call SickBeard's postprocessing script
|
||||||
|
# echo "[INFO] Post-Process: Running SickBeard's postprocessing script to notify unrar (second pass) failed"
|
||||||
|
# $PythonCmd $SabToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "" "" "" "" "1">/dev/null 2>&1
|
||||||
|
#fi
|
||||||
|
if [ "$CouchPotato" = "yes" -a "$NZBPP_CATEGORY" = "$CouchPotatoCategory" -a -e "$nzbToCouchPotato" ]; then
|
||||||
|
# Call CouchPotato's postprocessing script
|
||||||
|
echo "[INFO] Post-Process: Running CouchPotato's postprocessing script to notify unrar (second pass) failed"
|
||||||
|
$PythonCmd $nzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "" "" "" "" "1">/dev/null 2>&1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
exit $POSTPROCESS_ERROR
|
exit $POSTPROCESS_ERROR
|
||||||
fi
|
fi
|
||||||
|
@ -282,9 +306,9 @@ fi
|
||||||
# Clean up
|
# Clean up
|
||||||
echo "[INFO] Post-Process: Cleaning up"
|
echo "[INFO] Post-Process: Cleaning up"
|
||||||
chmod -R a+rw .
|
chmod -R a+rw .
|
||||||
rm *.nzb >/dev/null 2>&1
|
# Clean up list, space seperated from GUI
|
||||||
rm *.sfv >/dev/null 2>&1
|
rm $FileCleanUp >/dev/null 2>&1
|
||||||
rm *.1 >/dev/null 2>&1
|
# Removed by default
|
||||||
rm _brokenlog.txt >/dev/null 2>&1
|
rm _brokenlog.txt >/dev/null 2>&1
|
||||||
if [ "$Unrared" -eq 1 ]; then
|
if [ "$Unrared" -eq 1 ]; then
|
||||||
# Delete par2-file only if there were files for unpacking.
|
# Delete par2-file only if there were files for unpacking.
|
||||||
|
@ -321,30 +345,30 @@ fi
|
||||||
|
|
||||||
# Move categories to /share/yourdirectory and remove download destination directory
|
# Move categories to /share/yourdirectory and remove download destination directory
|
||||||
if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then
|
if [ "$NZBPP_CATEGORY" = "$SickBeardCategory" ]; then
|
||||||
echo "[INFO] Post-Process: Moving TV shows to $TV_DL_DIR"
|
echo "[INFO] Post-Process: Moving TV shows to $TvDownloadDir"
|
||||||
cp -R "$NZBPP_DIRECTORY" "$TV_DL_DIR" >/dev/null 2>&1
|
cp -R "$NZBPP_DIRECTORY" "$TvDownloadDir" >/dev/null 2>&1
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "[ERROR] Post-Process: Moving to $TV_DL_DIR"
|
echo "[ERROR] Post-Process: Moving to $TvDownloadDir"
|
||||||
exit $POSTPROCESS_ERROR
|
exit $POSTPROCESS_ERROR
|
||||||
else
|
else
|
||||||
rm -fr *
|
rm -fr *
|
||||||
cd ..
|
cd ..
|
||||||
rmdir "$NZBPP_DIRECTORY"
|
rmdir "$NZBPP_DIRECTORY"
|
||||||
NZBPP_DIRECTORY="$TV_DL_DIR"
|
NZBPP_DIRECTORY="$TvDownloadDir"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" ]; then
|
if [ "$NZBPP_CATEGORY" = "$CouchPotatoCategory" ]; then
|
||||||
echo "[INFO] Post-Process: Moving Movies to $MOVIES_DL_DIR"
|
echo "[INFO] Post-Process: Moving Movies to $MoviesDownloadDir"
|
||||||
cp -R "$NZBPP_DIRECTORY" "$MOVIES_DL_DIR" >/dev/null 2>&1
|
cp -R "$NZBPP_DIRECTORY" "$MoviesDownloadDir" >/dev/null 2>&1
|
||||||
if [ "$?" -ne 0 ]; then
|
if [ "$?" -ne 0 ]; then
|
||||||
echo "[ERROR] Post-Process: Moving to $MOVIES_DL_DIR"
|
echo "[ERROR] Post-Process: Moving to $MoviesDownloadDir"
|
||||||
exit $POSTPROCESS_ERROR
|
exit $POSTPROCESS_ERROR
|
||||||
else
|
else
|
||||||
rm -fr *
|
rm -fr *
|
||||||
cd ..
|
cd ..
|
||||||
rmdir "$NZBPP_DIRECTORY"
|
rmdir "$NZBPP_DIRECTORY"
|
||||||
NZBPP_DIRECTORY="$MOVIES_DL_DIR"
|
NZBPP_DIRECTORY="$MoviesDownloadDir"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -355,13 +379,13 @@ fi
|
||||||
if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$NzbToSickBeard" ]; then
|
if [ "$SickBeard" = "yes" -a "$NZBPP_CATEGORY" = "$SickBeardCategory" -a -e "$NzbToSickBeard" ]; then
|
||||||
# Call SickBeard's postprocessing script
|
# Call SickBeard's postprocessing script
|
||||||
echo "[INFO] Post-Process: Running SickBeard's postprocessing script"
|
echo "[INFO] Post-Process: Running SickBeard's postprocessing script"
|
||||||
$PythonCmd $NzbToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
$PythonCmd $NzbToSickBeard "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "" "" "" "" "0" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$CouchPotato" = "yes" -a "$NZBPP_CATEGORY" = "$CouchPotatoCategory" -a -e "$NzbToCouchPotato" ]; then
|
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"
|
echo "[INFO] Post-Process: Running CouchPotato's postprocessing script"
|
||||||
$PythonCmd $NzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" >/dev/null 2>&1
|
$PythonCmd $NzbToCouchPotato "$NZBPP_DIRECTORY" "$NZBPP_NZBFILENAME" "" "" "" "" "0" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if destination directory was set in postprocessing parameters
|
# Check if destination directory was set in postprocessing parameters
|
||||||
|
|
|
@ -36,15 +36,15 @@ PythonCmd=/usr/local/python/bin/python
|
||||||
NzbToSickBeard=/usr/local/nzbget/var/nzbToSickBeard.py
|
NzbToSickBeard=/usr/local/nzbget/var/nzbToSickBeard.py
|
||||||
|
|
||||||
# Set the full path where completed movies should be placed
|
# Set the full path where completed movies should be placed
|
||||||
# before CouchPotato's Renamer is called
|
# before SickBeard's Renamer is called
|
||||||
TV_DL_DIR=/usr/local/nzbget/complete/tv
|
TvDownloadDir=/usr/local/nzbget/complete/tv
|
||||||
|
|
||||||
# Set the full path to nzbToCouchpotato.py for Couchpotato's postprocessing
|
# Set the full path to nzbToCouchpotato.py for Couchpotato's postprocessing
|
||||||
NzbToCouchPotato=/usr/local/nzbget/var/nzbToCouchPotato.py
|
NzbToCouchPotato=/usr/local/nzbget/var/nzbToCouchPotato.py
|
||||||
|
|
||||||
# Set the full path where completed movies should be placed
|
# Set the full path where completed movies should be placed
|
||||||
# before CouchPotato's Renamer is called
|
# before CouchPotato's Renamer is called
|
||||||
MOVIES_DL_DIR=/usr/local/nzbget/complete/movies
|
MoviesDownloadDir=/usr/local/nzbget/complete/movies
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
### OPTIONS ###
|
### OPTIONS ###
|
||||||
|
@ -70,6 +70,8 @@ CouchPotato=yes
|
||||||
# Category for Couchpotato's postprocessing.
|
# Category for Couchpotato's postprocessing.
|
||||||
CouchPotatoCategory=movies
|
CouchPotatoCategory=movies
|
||||||
|
|
||||||
|
# Clean up list. (space seperated, default *.nzb *.sfv *.1)
|
||||||
|
FileCleanUp=*.nzb *.sfv *.1
|
||||||
##############################################################################
|
##############################################################################
|
||||||
### POSTPROCESSING-PARAMETERS ###
|
### POSTPROCESSING-PARAMETERS ###
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue