Check for KeyError
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
This commit is contained in:
parent
15ecb5c246
commit
49cd95e36c
@ -44,10 +44,15 @@ def get_content(
|
||||
"contentId": results[i][
|
||||
f"{'tmdbId' if service == 'radarr' else 'tvdbId'}"
|
||||
],
|
||||
"description": results[i]["overview"],
|
||||
}
|
||||
)
|
||||
|
||||
# Add overview field, set None if not available
|
||||
try:
|
||||
content_info[i]["overview"] = results[i]["overview"]
|
||||
except KeyError:
|
||||
content_info[i]["overview"] = None
|
||||
|
||||
# Add remotePoster field, set None if not available
|
||||
try:
|
||||
content_info[i]["remotePoster"] = results[i]["images"][0][
|
||||
|
Loading…
x
Reference in New Issue
Block a user