diff --git a/src/Ombi.Api.Sonarr/Models/SystemStatus.cs b/src/Ombi.Api.Sonarr/Models/SystemStatus.cs index 778570a4c..a78429328 100644 --- a/src/Ombi.Api.Sonarr/Models/SystemStatus.cs +++ b/src/Ombi.Api.Sonarr/Models/SystemStatus.cs @@ -3,23 +3,6 @@ namespace Ombi.Api.Sonarr public class SystemStatus { public string version { get; set; } - public string buildTime { get; set; } - public bool isDebug { get; set; } - public bool isProduction { get; set; } - public bool isAdmin { get; set; } - public bool isUserInteractive { get; set; } - public string startupPath { get; set; } - public string appData { get; set; } - public string osVersion { get; set; } - public bool isMonoRuntime { get; set; } - public bool isMono { get; set; } - public bool isLinux { get; set; } - public bool isOsx { get; set; } - public bool isWindows { get; set; } - public string branch { get; set; } - public string authentication { get; set; } - public string sqliteVersion { get; set; } public string urlBase { get; set; } - public string runtimeVersion { get; set; } } } \ No newline at end of file diff --git a/src/Ombi.Core/Models/TesterResultModel.cs b/src/Ombi.Core/Models/TesterResultModel.cs index 563fa5cb2..945e0e261 100644 --- a/src/Ombi.Core/Models/TesterResultModel.cs +++ b/src/Ombi.Core/Models/TesterResultModel.cs @@ -5,5 +5,6 @@ public bool IsValid { get; set; } public string Version { get; set; } public string ExpectedSubDir { get; set; } + public string AdditionalInformation { get; set; } } } diff --git a/src/Ombi/ClientApp/src/app/interfaces/ITester.ts b/src/Ombi/ClientApp/src/app/interfaces/ITester.ts index b5615aae7..6bca107f2 100644 --- a/src/Ombi/ClientApp/src/app/interfaces/ITester.ts +++ b/src/Ombi/ClientApp/src/app/interfaces/ITester.ts @@ -2,4 +2,5 @@ export interface ITesterResult { isValid: boolean; version?: string; expectedSubDir?: string; + additionalInformation?: string; } diff --git a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts index 3a8a55409..749be6ff6 100644 --- a/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts +++ b/src/Ombi/ClientApp/src/app/settings/sonarr/sonarr.component.ts @@ -220,7 +220,11 @@ export class SonarrComponent implements OnInit { } else if (result.expectedSubDir) { this.notificationService.error("Your Sonarr Base URL must be set to " + result.expectedSubDir); } else { - this.notificationService.error("We could not connect to Sonarr!"); + if (result.additionalInformation) { + this.notificationService.error(result.additionalInformation); + } else { + this.notificationService.error("We could not connect to Sonarr!"); + } } }); } diff --git a/src/Ombi/Controllers/V1/External/TesterController.cs b/src/Ombi/Controllers/V1/External/TesterController.cs index 79a008322..a244fd0fb 100644 --- a/src/Ombi/Controllers/V1/External/TesterController.cs +++ b/src/Ombi/Controllers/V1/External/TesterController.cs @@ -410,6 +410,30 @@ namespace Ombi.Controllers.V1.External { try { + if (string.IsNullOrEmpty(settings.ApiKey)) + { + return new TesterResultModel + { + IsValid = false, + AdditionalInformation = "NullApiKey" + }; + } + if (string.IsNullOrEmpty(settings.Ip)) + { + return new TesterResultModel + { + IsValid = false, + AdditionalInformation = "NullIp" + }; + } + if (settings.Port <= 0) + { + return new TesterResultModel + { + IsValid = false, + AdditionalInformation = "BadPort" + }; + } var result = await SonarrApi.SystemStatus(settings.ApiKey, settings.FullUri); return new TesterResultModel