added failed download handling from nzbget

This commit is contained in:
clinton-hall 2012-12-10 16:24:42 -08:00
commit 5af37ee6c7

View file

@ -39,14 +39,14 @@ if len(sys.argv) == 8:
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7]) autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[7])
# NZBGet # NZBGet
elif len(sys.argv) == 3: elif len(sys.argv) == 4:
# NZBGet argv: # NZBGet argv:
# 1 The final directory of the job (full path) # 1 The final directory of the job (full path)
# 2 The original name of the NZB file # 2 The original name of the NZB file
# From NZBGet only successful downloads are triggered so status is set to "0" # 3 The status of the download: 0 == successful
print "Script triggered from NZBGet, starting autoProcessTV..." print "Script triggered from NZBGet, starting autoProcessTV..."
autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], 0) autoProcessTV.processEpisode(sys.argv[1], sys.argv[2], sys.argv[3])
else: else:
print "Invalid number of arguments received from client." print "Invalid number of arguments received from client."