From 93f79c116a560f2c2f4312350ca6100ceb64090c Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Thu, 16 Feb 2023 18:28:24 +0100 Subject: [PATCH] Fix network for persons. --- CHANGES.md | 7 ++++++- lib/api_tvmaze/tvmaze_api.py | 13 +++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 35aeea84..e094277f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 3.27.4 (2023-02-15 13:30:00 UTC) +### 3.27.5 (2023-02-16 18:30:00 UTC) + +* Fix network for persons + + +### 3.27.4 (2023-02-15 13:30:00 UTC) * Fix updating with running virtualenv diff --git a/lib/api_tvmaze/tvmaze_api.py b/lib/api_tvmaze/tvmaze_api.py index cfc21718..75400769 100644 --- a/lib/api_tvmaze/tvmaze_api.py +++ b/lib/api_tvmaze/tvmaze_api.py @@ -523,12 +523,13 @@ class TvMaze(TVInfoBase): show.overview = clean_data(c.show.summary) show.status = clean_data(c.show.status) net = c.show.network or c.show.web_channel - show.network = clean_data(net.name) - show.network_id = net.maze_id - show.network_country = clean_data(net.country) - show.network_timezone = clean_data(net.timezone) - show.network_country_code = clean_data(net.code) - show.network_is_stream = None is not c.show.web_channel + if net: + show.network = clean_data(net.name) + show.network_id = net.maze_id + show.network_country = clean_data(net.country) + show.network_timezone = clean_data(net.timezone) + show.network_country_code = clean_data(net.code) + show.network_is_stream = None is not c.show.web_channel ch.append(TVInfoCharacter(name=clean_data(c.character.name), show=show)) try: birthdate = person_obj.birthday and tz_p.parse(person_obj.birthday).date()