mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-30 11:38:32 -07:00
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 ```
This commit is contained in:
parent
6955c59680
commit
3c5e7ba37f
1 changed files with 6 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue