コード例 #1
0
 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
     });
 }
コード例 #2
0
        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 }));
        }