From 812dd18b3d6df30d7ea83a9bea0e6bf40be09885 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Wed, 22 May 2013 17:23:00 -0700 Subject: [PATCH] Fixed Broken Plex tests --- NzbDrone.Core/Notifications/Plex/PlexProvider.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/NzbDrone.Core/Notifications/Plex/PlexProvider.cs b/NzbDrone.Core/Notifications/Plex/PlexProvider.cs index ed921fca5..e9fedfb38 100644 --- a/NzbDrone.Core/Notifications/Plex/PlexProvider.cs +++ b/NzbDrone.Core/Notifications/Plex/PlexProvider.cs @@ -23,7 +23,7 @@ namespace NzbDrone.Core.Notifications.Plex try { var command = String.Format("ExecBuiltIn(Notification({0}, {1}))", header, message); - SendCommand(settings.Host, command, settings.Username, settings.Password); + SendCommand(settings.Host, settings.Port, command, settings.Username, settings.Password); } catch(Exception ex) { @@ -66,9 +66,9 @@ namespace NzbDrone.Core.Notifications.Plex _httpProvider.DownloadString(url); } - public virtual string SendCommand(string host, string command, string username, string password) + public virtual string SendCommand(string host, int port, string command, string username, string password) { - var url = String.Format("http://{0}/xbmcCmds/xbmcHttp?command={1}", host, command); + var url = String.Format("http://{0}:{1}/xbmcCmds/xbmcHttp?command={2}", host, port, command); if (!String.IsNullOrEmpty(username)) { @@ -78,11 +78,11 @@ namespace NzbDrone.Core.Notifications.Plex return _httpProvider.DownloadString(url); } - public virtual void TestNotification(string host, string username, string password) + public virtual void TestNotification(string host, int port, string username, string password) { logger.Trace("Sending Test Notifcation to XBMC Host: {0}", host); var command = String.Format("ExecBuiltIn(Notification({0}, {1}))", "Test Notification", "Success! Notifications are setup correctly"); - SendCommand(host.Trim(), command, username, password); + SendCommand(host, port, command, username, password); } } }