[FIXED] Anyone using Sonarr-episode-trimmer ? Seems Dead now?

SO, been using this little GEM to delete and unmonitor x number of past episodes. VERY handy for stuff like news programs, etc.

https://gitlab.com/spoatacus/sonarr-episode-trimmer

However, it stopped working a couple weeks ago. Seems the repo isn’t supported anymore? Here’s the error I’m getting:


C:\sonarr-episode-trimmer>python sonarr-episode-trimmer.py --config C:\sonarr-episode-trimmer\config.ini --list-series
ERROR    303 See Other
ERROR
Traceback (most recent call last):
  File "sonarr-episode-trimmer.py", line 131, in <module>
    series = api_request('series')
  File "sonarr-episode-trimmer.py", line 46, in api_request
    return json.loads(resp_body)
  File "C:\Python27\lib\json\__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "C:\Python27\lib\json\decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Python27\lib\json\decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

C:\sonarr-episode-trimmer>

Using this on windows with Python27

@Taloth - You’re the fucking man!

For anyone else who is having this problem,

Change line 34 in sonarr-episode-trimmer.py to add your URL base (configured in Sonarr Settings -> General)


    url = "/[URLBASE]/api/%s?%s" % (action, urllib.urlencode(params))

Example:


 url = "/sonarr/api/%s?%s" % (action, urllib.urlencode(params))