haijeploeg/excludarr

Sonarr Fails with KeyError 'seasons'

Opened this issue · 0 comments

Describe the bug
When running Excludarr on Sonarr, it fails with KeyError 'seasons'.

To Reproduce
Steps to reproduce the behavior:
Run excludarr exclude sonarr -a not-monitored -d -e -y

Expected behavior
Excludarr should process series.

Versions

  1. OS: Docker on TrueNAS Scale 22.12.3
  2. Excludarr version: 1.0.7

Debug logging
|> excludarr <| # excludarr --debug sonarr exclude -a not-monitored -d -e -y
[2023-10-09 08:05:48] - Starting Excludarr v1.0.7
[2023-10-09 08:05:48] - Got sonarr as subcommand
[2023-10-09 08:05:48] - Reading configuration file
[2023-10-09 08:05:48] - Determining which configfile to use
[2023-10-09 08:05:48] - Configfile to use: /etc/excludarr/excludarr.yml
[2023-10-09 08:05:48] - Reading configfile: /etc/excludarr/excludarr.yml
[2023-10-09 08:05:48] - Read the following configuration: {'general': {'fast_search': True, 'locale': 'en_US', 'providers': ['Hulu', 'Disney Plus']}, 'radarr': {'url': 'http://10.22.0.15:7878', 'api_key': '', 'verify_ssl': False, 'exclude': ['']}, 'sonarr': {'url': 'http://10.22.0.15:8989', 'api_key': '', 'verify_ssl': False, 'exclude': ['White Collar']}, 'tmdb': {'api_key': ''}}
[2023-10-09 08:05:48] - Got exclude as subcommand
[2023-10-09 08:05:48] - Got CLI values for -p, --provider option:
[2023-10-09 08:05:48] - Got CLI values for -l, --locale option: None
[2023-10-09 08:05:48] - Got CLI values for -a, --action option: not-monitored
[2023-10-09 08:05:48] - Got CLI values for -d, --delete option: True
[2023-10-09 08:05:48] - Got CLI values for -e, --exclusion option: True
[2023-10-09 08:05:48] - Got CLI values for -y, --yes option: True
[2023-10-09 08:05:48] - Got CLI values for --progress option: False
[2023-10-09 08:05:48] - Initializing PySonarr
[2023-10-09 08:05:48] - Initializing JustWatch API with locale: en_US
[2023-10-09 08:05:48] - Getting all the series from Sonarr
[2023-10-09 08:05:49] - Got the following providers: Disney Plus, Hulu
[2023-10-09 08:05:49] - Big Wolf on Campus has IMDB ID: tt0189392 and TVDB_ID: 74477
[2023-10-09 08:05:49] - Processing title: Big Wolf on Campus with Sonarr ID: 1 and IMDB ID: tt0189392
[2023-10-09 08:05:49] - Query JustWatch API with title: Big Wolf on Campus
[2023-10-09 08:05:49] - Could not find Big Wolf on Campus using IMDB ID: tt0189392
[2023-10-09 08:05:49] - Could not find Big Wolf on Campus using IMDB, falling back to TMDB
[2023-10-09 08:05:49] - Processing title: Big Wolf on Campus with Sonarr ID: 1 and TVDB ID: 74477
[2023-10-09 08:05:49] - Query JustWatch API with title: Big Wolf on Campus
[2023-10-09 08:05:50] - Trying to obtain the TMDB ID using TVDB ID: 74477 from TMDB API
[2023-10-09 08:05:50] - Querying JustWatch API with ID: 13122 for title: Big Wolf on Campus
[2023-10-09 08:05:50] - Got IMDB ID's: ['tt0189392'] from JustWatch API
[2023-10-09 08:05:50] - Got TMDB ID's: [3471] from JustWatch API
[2023-10-09 08:05:50] - Found JustWatch ID: 13122 for Big Wolf on Campus with TMDB ID: 3471
[2023-10-09 08:05:50] - Look up season data for Big Wolf on Campus
[2023-10-09 08:05:50] - Processing season Season 1 of Big Wolf on Campus
[2023-10-09 08:05:50] - Processing season Season 2 of Big Wolf on Campus
[2023-10-09 08:05:50] - Processing season Season 3 of Big Wolf on Campus
[2023-10-09 08:05:50] - Silicon Valley has IMDB ID: tt2575988 and TVDB_ID: 277165
[2023-10-09 08:05:50] - Processing title: Silicon Valley with Sonarr ID: 3 and IMDB ID: tt2575988
[2023-10-09 08:05:50] - Query JustWatch API with title: Silicon Valley
[2023-10-09 08:05:50] - Could not find Silicon Valley using IMDB ID: tt2575988
[2023-10-09 08:05:50] - Could not find Silicon Valley using IMDB, falling back to TMDB
[2023-10-09 08:05:50] - Processing title: Silicon Valley with Sonarr ID: 3 and TVDB ID: 277165
[2023-10-09 08:05:50] - Query JustWatch API with title: Silicon Valley
[2023-10-09 08:05:50] - Trying to obtain the TMDB ID using TVDB ID: 277165 from TMDB API
[2023-10-09 08:05:50] - Querying JustWatch API with ID: 20760 for title: Silicon Valley
[2023-10-09 08:05:50] - Got IMDB ID's: ['tt2575988'] from JustWatch API
[2023-10-09 08:05:50] - Got TMDB ID's: [60573] from JustWatch API
[2023-10-09 08:05:50] - Found JustWatch ID: 20760 for Silicon Valley with TMDB ID: 60573
[2023-10-09 08:05:50] - Look up season data for Silicon Valley
[2023-10-09 08:05:51] - Processing season Season 1 of Silicon Valley
[2023-10-09 08:05:51] - Processing season Season 2 of Silicon Valley
[2023-10-09 08:05:51] - Processing season Season 3 of Silicon Valley
[2023-10-09 08:05:51] - Processing season Season 4 of Silicon Valley
[2023-10-09 08:05:51] - Processing season Season 5 of Silicon Valley
[2023-10-09 08:05:51] - Processing season Season 6 of Silicon Valley
[2023-10-09 08:05:51] - Stargirl has IMDB ID: tt8722888 and TVDB_ID: 361868
[2023-10-09 08:05:51] - Processing title: Stargirl with Sonarr ID: 4 and IMDB ID: tt8722888
[2023-10-09 08:05:51] - Query JustWatch API with title: Stargirl
[2023-10-09 08:05:51] - Could not find Stargirl using IMDB ID: tt8722888
[2023-10-09 08:05:51] - Could not find Stargirl using IMDB, falling back to TMDB
[2023-10-09 08:05:51] - Processing title: Stargirl with Sonarr ID: 4 and TVDB ID: 361868
[2023-10-09 08:05:51] - Query JustWatch API with title: Stargirl
[2023-10-09 08:05:51] - Trying to obtain the TMDB ID using TVDB ID: 361868 from TMDB API
[2023-10-09 08:05:51] - Querying JustWatch API with ID: 82542 for title: Stargirl
[2023-10-09 08:05:51] - Got IMDB ID's: ['tt8722938', 'tt4849624', 'tt8722888', 'tt8728974'] from JustWatch API
[2023-10-09 08:05:51] - Got TMDB ID's: [80986, 382748] from JustWatch API
[2023-10-09 08:05:51] - Found JustWatch ID: 82542 for Stargirl with TMDB ID: 80986
[2023-10-09 08:05:51] - Look up season data for Stargirl
[2023-10-09 08:05:52] - Processing season Season 1 of Stargirl
[2023-10-09 08:05:52] - Processing season Summer School of Stargirl
[2023-10-09 08:05:52] - Processing season Frenemies of Stargirl
[2023-10-09 08:05:52] - Step by Step has IMDB ID: tt0101205 and TVDB_ID: 76095
[2023-10-09 08:05:52] - Processing title: Step by Step with Sonarr ID: 5 and IMDB ID: tt0101205
[2023-10-09 08:05:52] - Query JustWatch API with title: Step by Step
[2023-10-09 08:05:52] - Could not find Step by Step using IMDB ID: tt0101205
[2023-10-09 08:05:52] - Could not find Step by Step using IMDB, falling back to TMDB
[2023-10-09 08:05:52] - Processing title: Step by Step with Sonarr ID: 5 and TVDB ID: 76095
[2023-10-09 08:05:52] - Query JustWatch API with title: Step by Step
[2023-10-09 08:05:52] - Trying to obtain the TMDB ID using TVDB ID: 76095 from TMDB API
[2023-10-09 08:05:52] - Querying JustWatch API with ID: 21294 for title: Step by Step
[2023-10-09 08:05:52] - Got IMDB ID's: ['tt0101205'] from JustWatch API
[2023-10-09 08:05:52] - Got TMDB ID's: [2617] from JustWatch API
[2023-10-09 08:05:52] - Found JustWatch ID: 21294 for Step by Step with TMDB ID: 2617
[2023-10-09 08:05:52] - Look up season data for Step by Step
Traceback (most recent call last):
File "/usr/local/bin/excludarr", line 33, in
sys.exit(load_entry_point('excludarr==1.0.7', 'console_scripts', 'excludarr')())
File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.7-py3.10.egg/excludarr/main.py", line 68, in cli
File "/usr/local/lib/python3.10/site-packages/typer/main.py", line 214, in call
return get_command(self)(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/typer/main.py", line 500, in wrapper
return callback(**use_params) # type: ignore
File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.7-py3.10.egg/excludarr/commands/sonarr.py", line 67, in exclude
File "/usr/local/lib/python3.10/site-packages/excludarr-1.0.7-py3.10.egg/excludarr/core/sonarr_actions.py", line 201, in get_series_to_exclude
KeyError: 'seasons'