Verify Sonarr quality override

Ombi implicitly trusts that the quality override is set correctly, and causes issues downstream.

Line 258 in [TvSender.cs](https://github.com/Ombi-app/Ombi/tree/develop/src/Ombi.Core/Senders/TvSender.cs#L258) it tries to add a series but the, `AddSeries` function in [SonarrApi.cs](https://github.com/Ombi-app/Ombi/blob/develop/src/Ombi.Api.Sonarr/SonarrApi.cs#L92) fails to validate the `NewSeries` object since the `qualityProfileId` attribute is set to `0`. In the end it assumes the series is added in Sonarr and causes a API request with series id set to `0` which causes the following error.

```
[Error] StatusCode: BadRequest, Reason: Bad Request, RequestUri: http://SONARR_HOST/sonarr/api/series/0
```
pull/4116/head
Emil Kitti 3 years ago committed by GitHub
parent 6955c59680
commit 3c5e7ba37f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -206,7 +206,11 @@ namespace Ombi.Core.Senders
// Overrides on the request take priority
if (model.ParentRequest.QualityOverride.HasValue)
{
qualityToUse = model.ParentRequest.QualityOverride.Value;
overrideQuality = model.ParentRequest.QualityOverride.Value;
if (overrideQuality > 0)
{
qualityToUse = overrideQuality;
}
}
if (model.ParentRequest.RootFolder.HasValue)
{
@ -547,4 +551,4 @@ namespace Ombi.Core.Senders
return string.Empty;
}
}
}
}

Loading…
Cancel
Save