From 77d3f93ffc93500a9613f60b53f08f22f05ab111 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sun, 27 Jan 2013 00:19:31 -0800 Subject: [PATCH] Correct Status report only logs renamer stared if success:true. fixes #30 --- autoProcessMovie.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/autoProcessMovie.py b/autoProcessMovie.py index 6e39eac3..7a178c1b 100644 --- a/autoProcessMovie.py +++ b/autoProcessMovie.py @@ -88,11 +88,12 @@ def process(dirName, nzbName=None, status=0): print "Unable to open URL: ", str(e) sys.exit(1) - result = urlObj.readlines() - for line in result: - print line - - print command, "started on CouchPotatoServer for", nzbName1 + result = json.load(urlObj) + print "CouchPotatoServer returned", result + if result['success']: + print command, "started on CouchPotatoServer for", nzbName1 + else: + print "Error", command, "has NOT started on CouchPotatoServer for", nzbName1 else: print "download of", nzbName1, "has failed."