Plex server testing will use username and password if configured

This commit is contained in:
Mark McDowall 2014-04-06 19:46:41 -07:00
parent 2cc0dc3aab
commit e58faf8621
2 changed files with 9 additions and 1 deletions

View File

@ -108,7 +108,13 @@ namespace NzbDrone.Core.Notifications.Plex
public void Execute(TestPlexServerCommand message) public void Execute(TestPlexServerCommand message)
{ {
if (!GetSectionKeys(new PlexServerSettings {Host = message.Host, Port = message.Port}).Any()) if (!GetSectionKeys(new PlexServerSettings
{
Host = message.Host,
Port = message.Port,
Username = message.Username,
Password = message.Password
}).Any())
{ {
throw new Exception("Unable to connect to Plex Server"); throw new Exception("Unable to connect to Plex Server");
} }

View File

@ -14,5 +14,7 @@ namespace NzbDrone.Core.Notifications.Plex
public string Host { get; set; } public string Host { get; set; }
public int Port { get; set; } public int Port { get; set; }
public string Username { get; set; }
public string Password { get; set; }
} }
} }