Sonarr: 2.0.0.4472
Mono: Debian 4.2.1.102+dfsg2-7ubuntu4
OS: Linux 4.4.0-62-generic
Request Failed: Unexpected character encountered while parsing value: T. Path 'addOptions.searchForMissingEpisodes', line 1, position 44.
I am trying to add a series to sonarr with a python script. Using a urllib2 post to the series-endpoint via the API gives this error.
Python code as follows:
toadd={'monitored': True, 'tvdbId': 289946, 'title': u'The Jinx: The Life and Deaths of Robert Durst', 'titleSlug': u'the-jinx-the-life-and-deaths-of-robert-durst', 'seasonFolder': True, 'qualityProfileId': '1', 'rootFolderPath': '/media/TV Shows/', 'seasons': [{u'monitored': True, u'seasonNumber': 1}], 'addOptions': {'searchForMissingEpisodes': True, 'ignoreEpisodesWithFiles': False}}
headers={'User-Agent':"Show adder", 'X-Api-Key':APIKEY, 'Content-Type':'application/json'}
url='http://localhost:8989/api/series/'
req = urllib2.Request(url=url, data=str(toadd), headers=headers)
sonarrresponse=urllib2.urlopen(req)
Any ideas what I am doing wrong?
Thanks!