mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-19 21:03:14 -07:00
added delete_failed option
This commit is contained in:
parent
f10fec0f8b
commit
4e0657d350
1 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
import urllib
|
import urllib
|
||||||
import os.path
|
import os.path
|
||||||
|
import shutil
|
||||||
import ConfigParser
|
import ConfigParser
|
||||||
import time
|
import time
|
||||||
import json
|
import json
|
||||||
|
@ -45,6 +46,7 @@ def process(dirName, nzbName=None, status=0):
|
||||||
apikey = config.get("CouchPotato", "apikey")
|
apikey = config.get("CouchPotato", "apikey")
|
||||||
delay = float(config.get("CouchPotato", "delay"))
|
delay = float(config.get("CouchPotato", "delay"))
|
||||||
method = config.get("CouchPotato", "method")
|
method = config.get("CouchPotato", "method")
|
||||||
|
delete_failed = int(config.get("CouchPotato", "delete_failed"))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
ssl = int(config.get("CouchPotato", "ssl"))
|
ssl = int(config.get("CouchPotato", "ssl"))
|
||||||
|
@ -146,3 +148,6 @@ def process(dirName, nzbName=None, status=0):
|
||||||
print line
|
print line
|
||||||
|
|
||||||
print "movie", movid, "set to try the next best release on CouchPotatoServer"
|
print "movie", movid, "set to try the next best release on CouchPotatoServer"
|
||||||
|
if delete_failed:
|
||||||
|
print "Deleting failed files and folder", dirName
|
||||||
|
shutil.rmtree(dirName)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue