diff --git a/frontend/src/Settings/General/HostSettings.js b/frontend/src/Settings/General/HostSettings.js
index a750d4bb9..5445808b0 100644
--- a/frontend/src/Settings/General/HostSettings.js
+++ b/frontend/src/Settings/General/HostSettings.js
@@ -20,6 +20,7 @@ function HostSettings(props) {
bindAddress,
port,
urlBase,
+ instanceName,
enableSsl,
sslPort,
sslCertPath,
@@ -72,6 +73,22 @@ function HostSettings(props) {
/>
+
+ {translate('InstanceName')}
+
+
+
+
,
string SslCertPassword { get; }
string UrlBase { get; }
string UiFolder { get; }
+ string InstanceName { get; }
bool UpdateAutomatically { get; }
UpdateMechanism UpdateMechanism { get; }
string UpdateScriptPath { get; }
string SyslogServer { get; }
int SyslogPort { get; }
+ string SyslogLevel { get; }
string PostgresHost { get; }
int PostgresPort { get; }
string PostgresUser { get; }
@@ -220,6 +222,7 @@ public string UrlBase
}
public string UiFolder => BuildInfo.IsDebug ? Path.Combine("..", "UI") : "UI";
+ public string InstanceName => GetValue("InstanceName", BuildInfo.AppName);
public bool UpdateAutomatically => GetValueBoolean("UpdateAutomatically", false, false);
@@ -228,8 +231,11 @@ public string UrlBase
public string UpdateScriptPath => GetValue("UpdateScriptPath", "", false);
public string SyslogServer => GetValue("SyslogServer", "", persist: false);
+
public int SyslogPort => GetValueInt("SyslogPort", 514, persist: false);
+ public string SyslogLevel => GetValue("SyslogLevel", LogLevel).ToLowerInvariant();
+
public int GetValueInt(string key, int defaultValue, bool persist = true)
{
return Convert.ToInt32(GetValue(key, defaultValue, persist));
diff --git a/src/NzbDrone.Core/Localization/Core/en.json b/src/NzbDrone.Core/Localization/Core/en.json
index da609f3b6..2d2616bce 100644
--- a/src/NzbDrone.Core/Localization/Core/en.json
+++ b/src/NzbDrone.Core/Localization/Core/en.json
@@ -200,6 +200,8 @@
"IndexerVipCheckExpiredClientMessage": "Indexer VIP benefits have expired: {0}",
"IndexerVipCheckExpiringClientMessage": "Indexer VIP benefits expiring soon: {0}",
"Info": "Info",
+ "InstanceName": "Instance Name",
+ "InstanceNameHelpText": "Instance name in tab and for Syslog app name",
"InteractiveSearch": "Interactive Search",
"Interval": "Interval",
"KeyboardShortcuts": "Keyboard Shortcuts",
diff --git a/src/NzbDrone.Core/Validation/RuleBuilderExtensions.cs b/src/NzbDrone.Core/Validation/RuleBuilderExtensions.cs
index 1149f51db..3c577d95c 100644
--- a/src/NzbDrone.Core/Validation/RuleBuilderExtensions.cs
+++ b/src/NzbDrone.Core/Validation/RuleBuilderExtensions.cs
@@ -61,5 +61,11 @@ public static IRuleBuilderOptions AsWarning(this IRuleBuilde
{
return ruleBuilder.WithState(v => NzbDroneValidationState.Warning);
}
+
+ public static IRuleBuilderOptions ContainsProwlarr(this IRuleBuilder ruleBuilder)
+ {
+ ruleBuilder.SetValidator(new NotEmptyValidator(null));
+ return ruleBuilder.SetValidator(new RegularExpressionValidator("prowlarr", RegexOptions.IgnoreCase)).WithMessage("Must contain Prowlarr");
+ }
}
}
diff --git a/src/Prowlarr.Api.V1/Config/HostConfigController.cs b/src/Prowlarr.Api.V1/Config/HostConfigController.cs
index 26fa1acc4..b55163f67 100644
--- a/src/Prowlarr.Api.V1/Config/HostConfigController.cs
+++ b/src/Prowlarr.Api.V1/Config/HostConfigController.cs
@@ -40,6 +40,7 @@ public HostConfigController(IConfigFileProvider configFileProvider,
SharedValidator.RuleFor(c => c.Port).ValidPort();
SharedValidator.RuleFor(c => c.UrlBase).ValidUrlBase();
+ SharedValidator.RuleFor(c => c.InstanceName).ContainsProwlarr().When(c => c.InstanceName.IsNotNullOrWhiteSpace());
SharedValidator.RuleFor(c => c.Username).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
SharedValidator.RuleFor(c => c.Password).NotEmpty().When(c => c.AuthenticationMethod != AuthenticationType.None);
diff --git a/src/Prowlarr.Api.V1/Config/HostConfigResource.cs b/src/Prowlarr.Api.V1/Config/HostConfigResource.cs
index 568756bb4..820552533 100644
--- a/src/Prowlarr.Api.V1/Config/HostConfigResource.cs
+++ b/src/Prowlarr.Api.V1/Config/HostConfigResource.cs
@@ -25,6 +25,7 @@ public class HostConfigResource : RestResource
public string SslCertPath { get; set; }
public string SslCertPassword { get; set; }
public string UrlBase { get; set; }
+ public string InstanceName { get; set; }
public bool UpdateAutomatically { get; set; }
public UpdateMechanism UpdateMechanism { get; set; }
public string UpdateScriptPath { get; set; }
@@ -67,6 +68,7 @@ public static HostConfigResource ToResource(this IConfigFileProvider model, ICon
SslCertPath = model.SslCertPath,
SslCertPassword = model.SslCertPassword,
UrlBase = model.UrlBase,
+ InstanceName = model.InstanceName,
UpdateAutomatically = model.UpdateAutomatically,
UpdateMechanism = model.UpdateMechanism,
UpdateScriptPath = model.UpdateScriptPath,