From e58faf8621a25483023f77f0496af17c2ebd8e66 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Sun, 6 Apr 2014 19:46:41 -0700 Subject: [PATCH] Plex server testing will use username and password if configured --- src/NzbDrone.Core/Notifications/Plex/PlexService.cs | 8 +++++++- .../Notifications/Plex/TestPlexServerCommand.cs | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Notifications/Plex/PlexService.cs b/src/NzbDrone.Core/Notifications/Plex/PlexService.cs index 7fddd2a64..0d4c6608b 100644 --- a/src/NzbDrone.Core/Notifications/Plex/PlexService.cs +++ b/src/NzbDrone.Core/Notifications/Plex/PlexService.cs @@ -108,7 +108,13 @@ namespace NzbDrone.Core.Notifications.Plex 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"); } diff --git a/src/NzbDrone.Core/Notifications/Plex/TestPlexServerCommand.cs b/src/NzbDrone.Core/Notifications/Plex/TestPlexServerCommand.cs index 19fac0641..de8394e97 100644 --- a/src/NzbDrone.Core/Notifications/Plex/TestPlexServerCommand.cs +++ b/src/NzbDrone.Core/Notifications/Plex/TestPlexServerCommand.cs @@ -14,5 +14,7 @@ namespace NzbDrone.Core.Notifications.Plex public string Host { get; set; } public int Port { get; set; } + public string Username { get; set; } + public string Password { get; set; } } }