diff options
author | Parker <contact@pkrm.dev> | 2025-01-20 21:07:52 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2025-01-20 21:07:52 -0600 |
commit | de7bdb5512336adb3480b44c740897779b657f8e (patch) | |
tree | 4211d063d65ac6c9558e3caa7841974dfab12b97 | |
parent | 6034a95e48bb5c785f0957c2061322e7f5fb0e03 (diff) |
Safety check
-rw-r--r-- | code/utils/content_add.py | 5 |
1 files changed, 4 insertions, 1 deletions
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 |