private static OmbiSettings ConvertToOmbiSettings(SaveOmbiSettingsModel model) { return(new OmbiSettings { Hostname = model.Hostname.Trim(), ApiKey = model.ApiKey.Trim(), ApiUsername = model.ApiUsername.Trim(), Port = model.Port, UseSSL = model.UseSSL, Version = model.Version }); }
public async Task <IActionResult> SaveTvShowsAsync([FromBody] SaveOmbiSettingsModel model) { var tvShowsSettings = new TvShowsSettings { Client = DownloadClient.Ombi, Command = model.Command.Trim(), }; var ombiSettings = ConvertToOmbiSettings(model); DownloadClientsSettingsRepository.SetOmbi(tvShowsSettings, ombiSettings); return(Ok(new { ok = true })); }