more accounting for bad ombi output. Addresses #119
This commit is contained in:
parent
f9f0953657
commit
1ae4383b56
1 changed files with 3 additions and 3 deletions
|
@ -102,13 +102,13 @@ class OmbiAPI(object):
|
|||
hash_id = hashit(f'{show.id}{show.tvDbId}{show.title}')
|
||||
|
||||
# Denied = 0, Approved = 1, Completed = 2, Pending = 3
|
||||
if show.childRequests[0]['denied']:
|
||||
if show.childRequests[0].get('denied'):
|
||||
status = 0
|
||||
|
||||
elif show.childRequests[0]['approved'] and show.childRequests[0]['available']:
|
||||
elif show.childRequests[0].get('approved') and show.childRequests[0].get('available'):
|
||||
status = 2
|
||||
|
||||
elif show.childRequests[0]['approved']:
|
||||
elif show.childRequests[0].get('approved'):
|
||||
status = 1
|
||||
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue