added TPB-failed branch. fixes #198

This commit is contained in:
clinton-hall 2013-11-03 22:02:52 +10:30
commit e50704df73
2 changed files with 9 additions and 4 deletions

View file

@ -36,7 +36,7 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
extractionSuccess = False
Logger.debug("MAIN: Received Directory: %s | Name: %s | Category: %s", inputDirectory, inputName, inputCategory)
if sbFork == "TPB" and inputCategory == sbCategory:
if sbFork in ["TPB", "TPB-failed"] and inputCategory == sbCategory:
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
result = autoProcessTV.processEpisode(inputDirectory, inputName, int(0))
if result == 1:

View file

@ -115,10 +115,10 @@ def processEpisode(dirName, nzbName=None, failed=False):
mediaContainer = (config.get("Extensions", "mediaExtensions")).split(',')
minSampleSize = int(config.get("Extensions", "minSampleSize"))
if fork != "TPB":
if not fork in ["TPB", "TPB-failed"]:
process_all_exceptions(nzbName.lower(), dirName)
if nzbName != "Manual Run" and fork != "TPB":
if nzbName != "Manual Run" and not fork in ["TPB", "TPB-failed"]:
# Now check if movie files exist in destination:
video = int(0)
for dirpath, dirnames, filenames in os.walk(dirName):
@ -157,12 +157,17 @@ def processEpisode(dirName, nzbName=None, failed=False):
Logger.info("The download failed. Sending 'failed' process request to SickBeard's failed branch")
# if you have specified you are using development branch from fork https://github.com/Tolstyak/Sick-Beard.git
if fork == "TPB":
if fork in ["TPB", "TPB-failed"]:
params['dir'] = dirName
if nzbName != None:
params['nzbName'] = nzbName
if status == 0:
Logger.info("The download succeeded. Sending process request to SickBeard's TPB branch")
if fork == "TPB-failed":
params['failed'] = failed
elif fork == "TPB-failed":
Logger.info("The download failed. Sending 'failed' process request to SickBeard's TPB-failed branch")
params['failed'] = failed
else:
Logger.info("The download failed. Nothing to process")
if delete_failed and os.path.isdir(dirName) and not dirName in ['sys.argv[0]','/','']: