From 873704313432c3b222b817b7862c7dab4231e0ed Mon Sep 17 00:00:00 2001 From: desimaniac <5501908+desimaniac@users.noreply.github.com> Date: Fri, 31 May 2019 00:24:59 -0500 Subject: [PATCH] Log: Ignore Non-Country errors during log output. --- traktarr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/traktarr.py b/traktarr.py index dc931e0..b7ef916 100755 --- a/traktarr.py +++ b/traktarr.py @@ -303,7 +303,7 @@ def shows(list_type, add_limit=0, add_delay=2.5, sort='votes', genre=None, folde if remove_rejected_from_recommended else None): log.info("Adding: %s | Genres: %s | Network: %s | Country: %s", series['show']['title'], ', '.join(series['show']['genres']), series['show']['network'], - series['show']['country'].upper()) + (series['show']['country'] or 'N/A').upper()) # determine which tags to use when adding this series use_tags = sonarr_helper.series_tag_id_from_network(profile_tags, cfg.sonarr.tags, @@ -532,7 +532,7 @@ def movies(list_type, add_limit=0, add_delay=2.5, sort='votes', rating=None, gen if (rating is None or movieRating is None) or movieRating >= rating: log.info("Adding: %s (%d) | Genres: %s | Country: %s", movie['movie']['title'], movie['movie']['year'], - ', '.join(movie['movie']['genres']), movie['movie']['country'].upper()) + ', '.join(movie['movie']['genres']), (movie['movie']['country'] or 'N/A').upper()) # add movie to radarr if radarr.add_movie(movie['movie']['ids']['tmdb'], movie['movie']['title'], movie['movie']['year'], movie['movie']['ids']['slug'], profile_id, cfg.radarr.root_folder, @@ -546,7 +546,7 @@ def movies(list_type, add_limit=0, add_delay=2.5, sort='votes', rating=None, gen else: log.info("SKIPPING: %s (%d) | Genres: %s | Country: %s", movie['movie']['title'], movie['movie']['year'], - ', '.join(movie['movie']['genres']), movie['movie']['country'].upper()) + ', '.join(movie['movie']['genres']), (movie['movie']['country'] or 'N/A').upper()) # stop adding movies, if added_movies >= add_limit if add_limit and added_movies >= add_limit: break