diff options
author | Parker M <contact@pkrm.dev> | 2023-09-16 22:33:31 -0500 |
---|---|---|
committer | Parker M <contact@pkrm.dev> | 2023-09-16 22:33:31 -0500 |
commit | 04a21c4f0876115acce1c6e25ab20e98d4bd8a2a (patch) | |
tree | c2204f5faf7b3f3a9bfa330a34c406757023a260 | |
parent | 7734ec1f82a5ff3f88508d0e5ba8efb76adc0637 (diff) |
Attempt to fix ValueError
-rw-r--r-- | app/messagearr.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/messagearr.py b/app/messagearr.py index 573c27e..f927c16 100644 --- a/app/messagearr.py +++ b/app/messagearr.py @@ -154,7 +154,6 @@ def incoming(): return 'OK' elif str(data['data']['payload']['text']).strip() == '/status': - print("TESTING") # This returns a list of ALL movies being downloaded, but not all of them were # requested by the user, so we need to filter out the ones that were not requested response = requests.get(f'{radarr_host}/api/v3/queue/', headers=headers) @@ -201,7 +200,8 @@ def incoming(): response = requests.get(f'{radarr_host}/api/v3/movie/{movie_id}', headers=headers) # This means that there is no current download, and no file has been found # MOST likely means a download just wasn't found, so alert the user - if response.json()['hasFile'] == False: + data = response.json() + if data['hasFile'] == False: message += f"{movies[movie_id]} - NOT FOUND\n\nThis means a download was not found for the movie(s), if this is a brand new movie that is likely the reason. If the movie has already been released on DVD/Blu-Ray, please contact Parker." # If the message is still empty, that means the user has no movies being downloaded |