Override Sonarr V3 Profiles endpoint

Although the "official" Sonarr API docs [still states](https://github.com/Sonarr/Sonarr/wiki/Profile) that the Profiles endpoint is `/profile`, that's severely outdated, and the entry on [WikiArr](https://wiki.servarr.com/sonarr) states that "the best way to view see the API is to watch the network calls the frontend makes via the browser development network call console".

Well, Sonarr's (own frontend implementation)[93fc9abae9/frontend/src/Store/Actions/Settings/qualityProfiles.js (L71)] and [NzbDrone proxy](41a821352e/src/NzbDrone.Core/ImportLists/Sonarr/SonarrV3Proxy.cs (L39)) use `/qualityprofile` for it.
This commit is contained in:
Igor Borges 2022-06-18 14:39:03 -03:00 committed by GitHub
commit 978946df94

View file

@ -21,5 +21,12 @@ namespace Ombi.Api.Sonarr
return await Api.Request<List<LanguageProfiles>>(request);
}
public async Task<IEnumerable<SonarrProfile>> GetProfiles(string apiKey, string baseUrl)
{
var request = new Request($"{ApiBaseUrl}qualityprofile", baseUrl, HttpMethod.Get);
request.AddHeader("X-Api-Key", apiKey);
return await Api.Request<List<SonarrProfile>>(request);
}
}
}