mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
Fixed Broken Plex tests
This commit is contained in:
parent
143675cf80
commit
812dd18b3d
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user