haijeploeg / excludarr

Excludarr manages your libraries in Radarr/Sonarr. It keeps track of your library and checks if your movies and series are also available on a configured streaming provider. It can exclude the movies and series that are available on a configured streaming provider. But it can also re-add movies and series if they are not streaming anymore.
MIT License
197 stars 12 forks source link

"IndexError: list index out of range" when run exclude with Sonarr #19

Closed KaHooli closed 2 years ago

KaHooli commented 2 years ago

Hi, when running the following command...

docker run -it --rm --name excludarr \
-e "GENERAL_COUNTRY=AU" \
-e "GENERAL_PROVIDERS=Netflix, \
Disney Plus, \
Apple TV Plus, \
7plus, \
ABC iview, \
SBS On Demand, \
YouTube Free" \
-e "TMDB_API_KEY=<TMDB API Key>" \
-e "SONARR_URL=http://sonarr:8989" \
-e "SONARR_API_KEY=<Sonarr API Key>" \
-e "SONARR_VERIFY_SSL=false" \
--network t2_proxy \
haijeploeg/excludarr \
exclude -e -d -f -t sonarr

I get the following output...

      ╷                                 ╷
  ID  │ Title                           │ Providers
 ═════╪═════════════════════════════════╪══════════════════════
  6   │ Archer (2009)                   │ netflix
  7   │ Arrow                           │ netflix
  26  │ Criminal Minds                  │ disney plus
  29  │ Dollface                        │ disney plus
  30  │ DuckTales (2017)                │ disney plus
  32  │ Elena of Avalor                 │ disney plus
  41  │ Gotham                          │ netflix
  42  │ Grey's Anatomy                  │ disney plus
  46  │ Homeland                        │ netflix, disney plus
  49  │ Knightfall                      │ netflix
  51  │ Last Man Standing (2011)        │ disney plus
  60  │ Marvel's Agents of S.H.I.E.L.D. │ disney plus
  67  │ Once Upon a Time (2011)         │ disney plus
  69  │ Outlander                       │ netflix
  74  │ Prison Break                    │ netflix, disney plus
  75  │ Rick and Morty                  │ netflix
  77  │ S.W.A.T. (2017)                 │ netflix
  83  │ Sleepy Hollow                   │ disney plus
  84  │ Sofia the First                 │ disney plus
  87  │ Star Wars Resistance            │ disney plus
  88  │ Station 19                      │ disney plus
  93  │ The 100                         │ netflix
  94  │ The Big Bang Theory             │ netflix
  95  │ The Blacklist                   │ netflix
  103 │ The Shannara Chronicles         │ netflix
  111 │ Titans (2018)                   │ netflix
  116 │ Vikings                         │ netflix
  120 │ Young Sheldon                   │ netflix
  122 │ The Mighty Ducks: Game Changers │ disney plus
  125 │ The Bad Batch                   │ disney plus
  128 │ BattleBots (2015)               │ netflix
      ╵                                 ╵
Traceback (most recent call last):
  File "/usr/local/bin/excludarr", line 33, in <module>
    sys.exit(load_entry_point('excludarr==0.2.0', 'console_scripts', 'excludarr')())
  File "/usr/local/lib/python3.8/site-packages/excludarr-0.2.0-py3.8.egg/excludarr/main.py", line 50, in main
  File "/usr/local/lib/python3.8/site-packages/cement/core/foundation.py", line 916, in run
    return_val = self.controller._dispatch()
  File "/usr/local/lib/python3.8/site-packages/cement/ext/ext_argparse.py", line 808, in _dispatch
    return func()
  File "/usr/local/lib/python3.8/site-packages/excludarr-0.2.0-py3.8.egg/excludarr/controllers/base.py", line 447, in exclude
  File "/usr/local/lib/python3.8/site-packages/excludarr-0.2.0-py3.8.egg/excludarr/controllers/base.py", line 79, in _exclude_sonarr
IndexError: list index out of range

I don't get this error when running for Radarr.

haijeploeg commented 2 years ago

Hi,

I just pushed a release of version v0.2.1. I probably didn't catch all the errors that are possible. Could you try this with this new release?

KaHooli commented 2 years ago

Issue seems to be resolved, just the confirmation message needs to be fixed to say TV shows rather than movies...

Succesfully deleted the movies from Sonarr
haijeploeg commented 2 years ago

Great, I will fix the text issue in the next version! Thanks for pointing it out :)