Sonarr update series files

Sonarr: 3.0.6.1196
OS: Win10 20H2

Problem: Show episodes aren’t updated “sometimes” when a new episode is downloaded. This leads to Sonarr downloading the episode over and over. If I manually click the “Refresh & Scan” the new episodes are added and the monitor status is removed.

Is this a bug with v3? Never had this issue in V2.

I do some post processing stuffs with scripts after the download is complete so if someone could assist me in doing a refresh & scan of a certain show via powershell and sonarrs restapi that would fix the problem aswell.

Thanks

This link is the official api documentation. In the actual example at the bottom, it already shows how to rescan a series using powershell (lucky you!). You can find the apikey in the webui under settings -> general. And you can find the seriesId with the /series endpoint of the api. You would setup the script as followed:

(1) make /series request
    (1.2) grab series title in that output
    (1.3) grab the corresponding id (at the bottom of every series object)
    (1.4) save that id in a variable
(2) make /command request shown at bottom of link where $sonarr_seriesid = $id_variable from 1.4

I can’t help you with the rest but I’m pretty comfortable with the sonarr api, so I thought I’d at least help you with that part.

Sounds like either sonarr is not importing the files itself or the file is being renamed/moved under sonarr’s nose and then detected as missing.

The first one can be solved by having sonarr trigger your script after import (on download / on upgrade) so it’s actually imported

The second can be worked around with calling the API

Thanks for the replies guys.
Bakerboy: yes that is probably the reason, the api rescan request will fix the issue I’m hoping.

Mr.Cas: Thanks. Seems to be working fine now.

For anyone else looking for the same thing.
Code example:

$SeriesName = "Fargo"
$SonarAddress = "http://localhost:8989"
$ApiKey = "askfk242mumbojumbo313hi"
$Series = ((Invoke-WebRequest -URI $SonarAddress/api/series -Header @{"X-Api-Key" = $apikey}) | ConvertFrom-Json) | Select Title, Id
$SeriesID = ($Series | where {$_.Title -match $SeriesName}).ID
$JsonParams = @{"name"="RescanSeries";"seriesId"="$SeriesID";} | ConvertTo-Json -Depth 100
Invoke-WebRequest -Uri $SonarAddress/api/command?apikey=$ApiKey -Method POST -Body $JsonParams