I've been trying to create a more general Sonarr plugin based on what you've done: https://gist.github.com/liiight/c9af578a97e704a26b50
Unfortunately I encounter an error when running:
2015-05-26 15:09 CRITICAL task retreive-from-sonarr BUG: Unhandled error in plugin configure_series: 404 Client Error: Not Found
2015-05-26 15:09 CRITICAL manager retreive-from-sonarr An unexpected crash has occurred. Writing crash report to C:\Python27\Scripts\crash_report.2015.05.26.150936538000.log
2015-05-26 15:09 WARNING task retreive-from-sonarr Aborting task (plugin: configure_series)
This is how I use it in flexget, via the configure_series plugin:
retreive-from-sonarr:
configure_series:
settings:
quality: 720p
from:
sonarr:
base_url: '{{ secrets.credentials.sonarr.url }}'
port: 8989
api_key: '{{ secrets.credentials.sonarr.api_key }}'
This is the crash report:
2015-05-26 15:09 DEBUG manager Figuring out config load paths
2015-05-26 15:09 DEBUG manager Found config: C:\Python27\Scripts\config.yml
2015-05-26 15:09 DEBUG manager Config file C:\Python27\Scripts\config.yml selected
2015-05-26 15:09 VERBOSE task_queue There are 1 tasks to execute. Shutdown will commence when they have completed.
2015-05-26 15:09 CRITICAL task retreive-from-sonarr BUG: Unhandled error in plugin configure_series: 404 Client Error: Not Found
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\flexget\task.py", line 435, in __run_plugin
return method(*args, **kwargs)
File "C:\Python27\lib\site-packages\flexget\event.py", line 22, in __call__
return self.func(*args, **kwargs)
File "C:\Python27\lib\site-packages\flexget\plugins\plugin_configure_series.py", line 69, in on_task_start
result = method(task, input_config)
File "C:\Python27\lib\site-packages\flexget\event.py", line 22, in __call__
return self.func(*args, **kwargs)
File "C:\Python27\Scripts\plugins\sonarr.py", line 27, in on_task_input
json = task.requests.get(url, headers=headers).json()
File "C:\Python27\lib\site-packages\requests\sessions.py", line 477, in get
return self.request('GET', url, **kwargs)
File "C:\Python27\lib\site-packages\flexget\utils\requests.py", line 155, in request
result.raise_for_status()
File "C:\Python27\lib\site-packages\requests\models.py", line 851, in raise_for_status
raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found
This is the JSON response that Sonarr provides for the "shows" endpoint call:
http://pastebin.com/bs3amFsV
What am I doing wrong?