mirror of https://github.com/Radarr/Radarr
New: Support for SSL connections to Plex Media Server
This commit is contained in:
parent
eb8af60029
commit
860d7ed079
|
@ -160,7 +160,9 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
|
|
||||||
private RestClient GetPlexServerClient(PlexServerSettings settings)
|
private RestClient GetPlexServerClient(PlexServerSettings settings)
|
||||||
{
|
{
|
||||||
return RestClientFactory.BuildClient(String.Format("http://{0}:{1}", settings.Host, settings.Port));
|
var protocol = settings.UseSsl ? "https" : "http";
|
||||||
|
|
||||||
|
return RestClientFactory.BuildClient(String.Format("{0}://{1}:{2}", protocol, settings.Host, settings.Port));
|
||||||
}
|
}
|
||||||
|
|
||||||
private RestRequest GetPlexServerRequest(string resource, Method method, PlexServerSettings settings)
|
private RestRequest GetPlexServerRequest(string resource, Method method, PlexServerSettings settings)
|
||||||
|
|
|
@ -144,13 +144,7 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var sections = GetSections(new PlexServerSettings
|
var sections = GetSections(settings);
|
||||||
{
|
|
||||||
Host = settings.Host,
|
|
||||||
Port = settings.Port,
|
|
||||||
Username = settings.Username,
|
|
||||||
Password = settings.Password
|
|
||||||
});
|
|
||||||
|
|
||||||
if (sections.Empty())
|
if (sections.Empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,6 +40,9 @@ namespace NzbDrone.Core.Notifications.Plex
|
||||||
[FieldDefinition(4, Label = "Update Library", Type = FieldType.Checkbox)]
|
[FieldDefinition(4, Label = "Update Library", Type = FieldType.Checkbox)]
|
||||||
public Boolean UpdateLibrary { get; set; }
|
public Boolean UpdateLibrary { get; set; }
|
||||||
|
|
||||||
|
[FieldDefinition(5, Label = "Use SSL", Type = FieldType.Checkbox, HelpText = "Connect to Plex over HTTPS instead of HTTP")]
|
||||||
|
public Boolean UseSsl { get; set; }
|
||||||
|
|
||||||
public bool IsValid
|
public bool IsValid
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
Loading…
Reference in New Issue