mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
fixed for updated version of Gamez
This commit is contained in:
parent
208cc7f2d4
commit
eaf4385cde
1 changed files with 5 additions and 3 deletions
|
@ -66,13 +66,15 @@ def process(dirName, nzbName=None, status=0):
|
||||||
else:
|
else:
|
||||||
protocol = "http://"
|
protocol = "http://"
|
||||||
|
|
||||||
|
baseURL = protocol + host + ":" + port + web_root + "/api?api_key=" + apikey + "&mode="
|
||||||
|
|
||||||
fields = nzbName.split("-")
|
fields = nzbName.split("-")
|
||||||
gamezID = fields[0].replace("[","").replace("]","").replace(" ","")
|
gamezID = fields[0].replace("[","").replace("]","").replace(" ","")
|
||||||
downloadStatus = 'Wanted'
|
downloadStatus = 'Wanted'
|
||||||
if(status == '0'):
|
if status == 0:
|
||||||
downloadStatus = 'Downloaded'
|
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)
|
Logger.debug("Opening URL: %s", url)
|
||||||
|
|
||||||
|
@ -84,7 +86,7 @@ def process(dirName, nzbName=None, status=0):
|
||||||
|
|
||||||
result = json.load(urlObj)
|
result = json.load(urlObj)
|
||||||
Logger.info("Gamez returned %s", result)
|
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)
|
Logger.info("Status for %s has been set to %s in Gamez", gamezID, downloadStatus)
|
||||||
else:
|
else:
|
||||||
Logger.error("Status for %s has NOT been updated in Gamez", gamezID)
|
Logger.error("Status for %s has NOT been updated in Gamez", gamezID)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue