From d41424725937e3ef058edf6a57cef24109843564 Mon Sep 17 00:00:00 2001 From: clinton-hall Date: Sat, 22 Mar 2014 10:22:04 +1030 Subject: [PATCH] fix release status check --- autoProcess/autoProcessMovie.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoProcess/autoProcessMovie.py b/autoProcess/autoProcessMovie.py index 961bfc32..be633ebb 100644 --- a/autoProcess/autoProcessMovie.py +++ b/autoProcess/autoProcessMovie.py @@ -142,8 +142,8 @@ def get_status(baseURL, movie_id, download_id): try: result = json.load(urlObj) movie_status = str(result["media"]["status"]) - release_status = None # for now... keep this as a place holder. - Logger.debug("This movie is marked as status %s in CouchPotatoServer", movie_status) + release_status = [item["status"] for item in result["media"]["releases"] if "download_info" in item and item["download_info"]["id"].lower() == download_id.lower()][0] + Logger.debug("This movie is marked as status %s, with release status %s, in CouchPotatoServer", movie_status, release_status) except: # index out of range/doesn't exist? Logger.exception("Could not find a status for this movie") movie_status = None