Guest User

Untitled

a guest
Mar 22nd, 2012
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. #!/bin/sh
  2. #------------------------------------------
  3. # SabNZBD post processing script TV series
  4. #
  5. # use this script for sabNZBd post processing
  6. #
  7. # Author: J. van Emden (Brickman)
  8. # Latest version: http://synology.brickman.nl
  9. #
  10. # Location: /volume1/@appstore/scripts/sab
  11. #
  12. # Requirements:
  13. # - subli_findTV_sab.sh
  14. # - sabToSickBeard.py
  15. # - autoProcessTV.cfg (example: http://dl.dropbox.com/u/5653370/syn_files/sickbeard/autoProcessTV.cfg)
  16. #
  17. # Version:
  18. # 2011-12-19:
  19. # - Initial release
  20. #
  21. #------------------------------------------
  22. #
  23.  
  24. PATH_TO_PYTHON=/usr/local/python26/bin/python
  25. #PATH_TO_PYTHON=$(which python2.6) # Find the Python 2.6 executable if installed with iPKG
  26. # if you use the Zebulon package then it is /usr/local/python26/bin/python
  27. PATH_TO_POST=/volume1/@appstore/scripts/sab # Folder of the sabNZBd post processing scripts
  28.  
  29. ## sabnzbd parameters (can be set as a postprocessor for a certain category
  30. # 1 The final directory of the job (full path)
  31. # 2 The original name of the NZB file
  32. # 3 Clean version of the job name (no path info and ".nzb" removed)
  33. # 4 Indexer's report number (if supported)
  34. # 5 User-defined category
  35. # 6 Group that the NZB was posted in e.g. alt.binaries.x
  36. # 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+21
  37.  
  38. if [ $# -lt 2 ]; then
  39. echo "No folder supplied - is this being called from SABnzbd?"
  40. exit;
  41. elif [ $# -ge 3 ]; then
  42. # Find subtitles
  43. sh ${PATH_TO_POST}/subli_findTV_sab.sh "$1" "$2" "$3"
  44.  
  45. # Send it to Sick Beard
  46. $PATH_TO_PYTHON ${PATH_TO_POST}/sabToSickBeard.py "$1" "$2" "$3"
  47. else
  48. # Find subtitles
  49. sh ${PATH_TO_POST}/subli_findTV_sab.sh "$1" "$2"
  50.  
  51. # Send it to Sick Beard
  52. # $PATH_TO_PYTHON ${PATH_TO_POST}/sabToSickBeard.py "$1" "$2"
  53. $PATH_TO_PYTHON /usr/local/var/sickbeard/autoProcessTV/sabToSickBeard.py "$1" "$2"
  54. fi
Advertisement
Add Comment
Please, Sign In to add comment