Correct Status report

only logs renamer stared if success:true.
fixes #30
This commit is contained in:
clinton-hall 2013-01-27 00:19:31 -08:00
commit 77d3f93ffc

View file

@ -88,11 +88,12 @@ def process(dirName, nzbName=None, status=0):
print "Unable to open URL: ", str(e) print "Unable to open URL: ", str(e)
sys.exit(1) sys.exit(1)
result = urlObj.readlines() result = json.load(urlObj)
for line in result: print "CouchPotatoServer returned", result
print line if result['success']:
print command, "started on CouchPotatoServer for", nzbName1 print command, "started on CouchPotatoServer for", nzbName1
else:
print "Error", command, "has NOT started on CouchPotatoServer for", nzbName1
else: else:
print "download of", nzbName1, "has failed." print "download of", nzbName1, "has failed."