From 569826087d5ed0e28d8d26a892435ad64cdbefcd Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Mon, 14 Mar 2022 08:52:55 -0400 Subject: [PATCH] [13] fix list index error --- VERSION | 2 +- modules/tmdb.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 63eb2b7c..6ffda7fc 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.1-develop12 +1.16.1-develop13 diff --git a/modules/tmdb.py b/modules/tmdb.py index 2544fc76..9be07e74 100644 --- a/modules/tmdb.py +++ b/modules/tmdb.py @@ -110,7 +110,7 @@ class TMDbMovie(TMDBObj): self.original_title = data["original_title"] if isinstance(data, dict) else data.original_title self.release_date = data["release_date"] if isinstance(data, dict) else data.release_date - self.studio = data["studio"] if isinstance(data, dict) else data.companies[0].name + self.studio = data["studio"] if isinstance(data, dict) else data.companies[0].name if data.companies else None self.collection_id = data["collection_id"] if isinstance(data, dict) else data.collection.id if data.collection else None self.collection_name = data["collection_name"] if isinstance(data, dict) else data.collection.name if data.collection else None @@ -134,7 +134,7 @@ class TMDbShow(TMDBObj): self.last_air_date = data["last_air_date"] if isinstance(data, dict) else data.last_air_date self.status = data["status"] if isinstance(data, dict) else data.status self.type = data["type"] if isinstance(data, dict) else data.type - self.studio = data["studio"] if isinstance(data, dict) else data.networks[0].name + self.studio = data["studio"] if isinstance(data, dict) else data.networks[0].name if data.networks else None self.tvdb_id = data["tvdb_id"] if isinstance(data, dict) else data.tvdb_id loop = data["countries"].split("|") if isinstance(data, dict) else data.origin_countries self.countries = [TMDbCountry(c) for c in loop]