Check for KeyError
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run

This commit is contained in:
Parker M. 2025-01-20 21:15:22 -06:00
parent 15ecb5c246
commit 49cd95e36c
Signed by: parker
GPG Key ID: 505ED36FC12B5D5E

View File

@ -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][