From de7bdb5512336adb3480b44c740897779b657f8e Mon Sep 17 00:00:00 2001 From: Parker Date: Mon, 20 Jan 2025 21:07:52 -0600 Subject: [PATCH] Safety check --- code/utils/content_add.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/utils/content_add.py b/code/utils/content_add.py index fda43af..5594006 100644 --- a/code/utils/content_add.py +++ b/code/utils/content_add.py @@ -31,7 +31,10 @@ def add_content( else f"{host}/api/v3/series/lookup?term=tvdb:{content_info['contentId']}" ), headers=headers, - ).json()[0] + ).json() + + if len(data) > 1: + data = data[0] data["monitored"] = True data["qualityProfileId"] = profile_id