|
|
@ -403,9 +403,13 @@ namespace Ombi.Controllers.V1
|
|
|
|
/// </summary>
|
|
|
|
/// </summary>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpGet("radarr")]
|
|
|
|
[HttpGet("radarr")]
|
|
|
|
public async Task<RadarrSettings> RadarrSettings()
|
|
|
|
public async Task<RadarrCombinedModel> RadarrSettings()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await Get<RadarrSettings>();
|
|
|
|
return new RadarrCombinedModel
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Radarr = await Get<RadarrSettings>(),
|
|
|
|
|
|
|
|
Radarr4K = await Get<Radarr4KSettings>(),
|
|
|
|
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// <summary>
|
|
|
@ -474,9 +478,11 @@ namespace Ombi.Controllers.V1
|
|
|
|
/// <param name="settings">The settings.</param>
|
|
|
|
/// <param name="settings">The settings.</param>
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
[HttpPost("radarr")]
|
|
|
|
[HttpPost("radarr")]
|
|
|
|
public async Task<bool> RadarrSettings([FromBody]RadarrSettings settings)
|
|
|
|
public async Task<bool> RadarrSettings([FromBody]RadarrCombinedModel settings)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var result = await Save(settings);
|
|
|
|
var radarrResult = await Save(settings.Radarr);
|
|
|
|
|
|
|
|
var radarr4kResult = await Save(settings.Radarr4K);
|
|
|
|
|
|
|
|
var result = radarr4kResult && radarrResult;
|
|
|
|
if (result)
|
|
|
|
if (result)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_cache.Remove(CacheKeys.RadarrRootProfiles);
|
|
|
|
_cache.Remove(CacheKeys.RadarrRootProfiles);
|
|
|
|