mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
added TPB-failed branch. fixes #198
This commit is contained in:
parent
9d1fb5072a
commit
e50704df73
2 changed files with 9 additions and 4 deletions
|
@ -36,7 +36,7 @@ def main(inputDirectory, inputName, inputCategory, inputHash, inputID):
|
||||||
extractionSuccess = False
|
extractionSuccess = False
|
||||||
|
|
||||||
Logger.debug("MAIN: Received Directory: %s | Name: %s | Category: %s", inputDirectory, inputName, inputCategory)
|
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)
|
Logger.info("MAIN: Calling Sick-Beard to post-process: %s", inputName)
|
||||||
result = autoProcessTV.processEpisode(inputDirectory, inputName, int(0))
|
result = autoProcessTV.processEpisode(inputDirectory, inputName, int(0))
|
||||||
if result == 1:
|
if result == 1:
|
||||||
|
|
|
@ -115,10 +115,10 @@ def processEpisode(dirName, nzbName=None, failed=False):
|
||||||
mediaContainer = (config.get("Extensions", "mediaExtensions")).split(',')
|
mediaContainer = (config.get("Extensions", "mediaExtensions")).split(',')
|
||||||
minSampleSize = int(config.get("Extensions", "minSampleSize"))
|
minSampleSize = int(config.get("Extensions", "minSampleSize"))
|
||||||
|
|
||||||
if fork != "TPB":
|
if not fork in ["TPB", "TPB-failed"]:
|
||||||
process_all_exceptions(nzbName.lower(), dirName)
|
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:
|
# Now check if movie files exist in destination:
|
||||||
video = int(0)
|
video = int(0)
|
||||||
for dirpath, dirnames, filenames in os.walk(dirName):
|
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")
|
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 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
|
params['dir'] = dirName
|
||||||
if nzbName != None:
|
if nzbName != None:
|
||||||
params['nzbName'] = nzbName
|
params['nzbName'] = nzbName
|
||||||
if status == 0:
|
if status == 0:
|
||||||
Logger.info("The download succeeded. Sending process request to SickBeard's TPB branch")
|
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:
|
else:
|
||||||
Logger.info("The download failed. Nothing to process")
|
Logger.info("The download failed. Nothing to process")
|
||||||
if delete_failed and os.path.isdir(dirName) and not dirName in ['sys.argv[0]','/','']:
|
if delete_failed and os.path.isdir(dirName) and not dirName in ['sys.argv[0]','/','']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue