Fixed: URL Base setting for Kodi connections
This commit is contained in:
parent
0183812cc5
commit
2068c5393e
|
@ -75,7 +75,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
||||||
|
|
||||||
private string ProcessRequest(XbmcSettings settings, string method, params object[] parameters)
|
private string ProcessRequest(XbmcSettings settings, string method, params object[] parameters)
|
||||||
{
|
{
|
||||||
var url = HttpRequestBuilder.BuildBaseUrl(settings.UseSsl, settings.Host, settings.Port, "jsonrpc");
|
var url = HttpRequestBuilder.BuildBaseUrl(settings.UseSsl, settings.Host, settings.Port, settings.UrlBase);
|
||||||
var requestBuilder = new JsonRpcRequestBuilder(url, method, parameters);
|
var requestBuilder = new JsonRpcRequestBuilder(url, method, parameters);
|
||||||
|
|
||||||
requestBuilder.LogResponseContent = true;
|
requestBuilder.LogResponseContent = true;
|
||||||
|
|
|
@ -14,16 +14,18 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
||||||
{
|
{
|
||||||
RuleFor(c => c.Host).ValidHost();
|
RuleFor(c => c.Host).ValidHost();
|
||||||
RuleFor(c => c.DisplayTime).GreaterThanOrEqualTo(2);
|
RuleFor(c => c.DisplayTime).GreaterThanOrEqualTo(2);
|
||||||
|
RuleFor(c => c.UrlBase).ValidUrlBase();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class XbmcSettings : IProviderConfig
|
public class XbmcSettings : IProviderConfig
|
||||||
{
|
{
|
||||||
private static readonly XbmcSettingsValidator Validator = new XbmcSettingsValidator();
|
private static readonly XbmcSettingsValidator Validator = new ();
|
||||||
|
|
||||||
public XbmcSettings()
|
public XbmcSettings()
|
||||||
{
|
{
|
||||||
Port = 8080;
|
Port = 8080;
|
||||||
|
UrlBase = "/jsonrpc";
|
||||||
DisplayTime = 5;
|
DisplayTime = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +67,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
||||||
public bool AlwaysUpdate { get; set; }
|
public bool AlwaysUpdate { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string Address => $"{Host.ToUrlHost()}:{Port}";
|
public string Address => $"{Host.ToUrlHost()}:{Port}{UrlBase}";
|
||||||
|
|
||||||
public NzbDroneValidationResult Validate()
|
public NzbDroneValidationResult Validate()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue