1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-09 04:22:30 +01:00

Fixed Broken Plex tests

This commit is contained in:
Mark McDowall 2013-05-22 17:23:00 -07:00
parent 143675cf80
commit 812dd18b3d

View File

@ -23,7 +23,7 @@ public virtual void Notify(PlexClientSettings settings, string header, string me
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 @@ public void UpdateSection(string host, int key)
_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 @@ public virtual string SendCommand(string host, string command, string username,
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);
}
}
}