Skip to content

Commit

Permalink
Override Sonarr V3 Profiles endpoint
Browse files Browse the repository at this point in the history
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)[https://github.com/Sonarr/Sonarr/blob/93fc9abae91aa4d0093b0df0351d2324b02f8b96/frontend/src/Store/Actions/Settings/qualityProfiles.js#L71] and [NzbDrone proxy](https://github.com/Sonarr/Sonarr/blob/41a821352e3e3e91d5f85cd21da48bd5d0d86452/src/NzbDrone.Core/ImportLists/Sonarr/SonarrV3Proxy.cs#L39) use `/qualityprofile` for it.
  • Loading branch information
comigor committed Jun 18, 2022
1 parent a9f7980 commit c80c348
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Ombi.Api.Sonarr/SonarrV3Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,12 @@ public async Task<IEnumerable<LanguageProfiles>> LanguageProfiles(string apiKey,

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);
}
}
}

0 comments on commit c80c348

Please sign in to comment.