Sonarr version (exact version): 4.0.0.748
Mono version (if Sonarr is not running on Windows):
OS: Windows 10
Debug logs:
Description of issue: the manual import script I was using with version 3 is not working with version 4
The v3 powershell script uses this:
$URL = ‘http://localhost:8989/api/command’
$JSON = ‘{“name”: “DownloadedEpisodesScan”, “path”: "’ + $path.replace(’\’,’\\’) + ‘", “importMode”: “Move”}’
Invoke-RestMethod -Uri $URL -Method Post -Body $JSON -Headers @{“X-Api-Key” = $apikey}
$path is the full path to a folder containing a TV episode file
I changed the URL to http://localhost:8989/api/v3/command
but I get this error:
Invoke-RestMethod : The remote server returned an error: (415) Unsupported Media Type.
I guess the API has changed but I’m not getting enough info from the API wiki page to figure out what needs to be changed.