From 9b38729b95ab1b5a051778cfc778ddba81b0e0ae Mon Sep 17 00:00:00 2001 From: Luis Garcia Date: Sun, 14 Apr 2024 17:08:49 -0600 Subject: [PATCH] Watched: Use get for season Use get to avoid KeyError if season doesnt exist. --- src/watched.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/watched.py b/src/watched.py index 57f020d..4d4f7cc 100644 --- a/src/watched.py +++ b/src/watched.py @@ -248,7 +248,7 @@ def filter_episode_watched_list_2_keys_dict( # Iterate through episode_watched_list_2_keys_dict["season"] and find the indecies that match season for season_index, season_value in enumerate( - episode_watched_list_2_keys_dict["season"] + episode_watched_list_2_keys_dict.get("season") ): if season_value == season: season_indecies.append(season_index)