mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 22:03:13 -07:00
Update nzbToSickBeard.py
This commit is contained in:
parent
a68a5c54b8
commit
34ab8ddedc
1 changed files with 13 additions and 30 deletions
|
@ -17,18 +17,17 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Sick Beard. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# Edited by Clinton Hall to prevent processing of failed downloads.
|
||||
# Also added suppot for NZBGet. With help from thorli
|
||||
|
||||
|
||||
import sys
|
||||
import autoProcessTV
|
||||
|
||||
print "nzbToSickBeard V4.0"
|
||||
if len(sys.argv) < 8:
|
||||
print "Not enough arguments received from SABnzbd. Please update it."
|
||||
sys.exit()
|
||||
else:
|
||||
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||
|
||||
# SABnzbd
|
||||
if len(sys.argv) == 8:
|
||||
# SABnzbd argv:
|
||||
# 1 The final directory of the job (full path)
|
||||
# 2 The original name of the NZB file
|
||||
|
@ -36,20 +35,4 @@ if len(sys.argv) == 8:
|
|||
# 4 Indexer's report number (if supported)
|
||||
# 5 User-defined category
|
||||
# 6 Group that the NZB was posted in e.g. alt.binaries.x
|
||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+2
|
||||
print "Script triggered from SABnzbd, starting autoProcessTV..."
|
||||
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
|
||||
|
||||
# NZBGet
|
||||
elif len(sys.argv) == 4:
|
||||
# NZBGet argv:
|
||||
# 1 The final directory of the job (full path)
|
||||
# 2 The original name of the NZB file
|
||||
# 3 The status of the download: 0 == successful
|
||||
print "Script triggered from NZBGet, starting autoProcessTV..."
|
||||
|
||||
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
|
||||
|
||||
else:
|
||||
print "Invalid number of arguments received from client."
|
||||
sys.exit()
|
||||
# 7 Status of post processing. 0 = OK, 1=failed verification, 2=failed unpack, 3=1+21
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue