From eaf4385cdea63da5b8c058845e4d80bc0b2f56b7 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Wed, 6 Mar 2013 21:03:48 -0800 Subject: [PATCH] fixed for updated version of Gamez --- autoProcessGames | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autoProcessGames b/autoProcessGames index e84826c7..a5fa6d89 100644 --- a/autoProcessGames +++ b/autoProcessGames @@ -66,13 +66,15 @@ def process(dirName, nzbName=None, status=0): else: protocol = "http://" + baseURL = protocol + host + ":" + port + web_root + "/api?api_key=" + apikey + "&mode=" + fields = nzbName.split("-") gamezID = fields[0].replace("[","").replace("]","").replace(" ","") downloadStatus = 'Wanted' - if(status == '0'): + if status == 0: downloadStatus = 'Downloaded' - URL = protocol + host + ":" + port + web_root + "updatestatus?game_id=" + gamezID + "&status=" + downloadStatus + URL = baseURL + "UPDATEREQUESTEDSTATUS&db_id=" + gamezID + "&status=" + downloadStatus Logger.debug("Opening URL: %s", url) @@ -84,7 +86,7 @@ def process(dirName, nzbName=None, status=0): result = json.load(urlObj) Logger.info("Gamez returned %s", result) - if result == "OK": + if result['success']: Logger.info("Status for %s has been set to %s in Gamez", gamezID, downloadStatus) else: Logger.error("Status for %s has NOT been updated in Gamez", gamezID)