mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-15 09:33:52 -07:00
Test buttons for XBMC
New: Added buttons to test XBMC configuration
This commit is contained in:
parent
d070401f20
commit
cacd86b4ef
4 changed files with 98 additions and 16 deletions
|
@ -18,11 +18,13 @@ namespace NzbDrone.Web.Controllers
|
|||
private readonly GrowlProvider _growlProvider;
|
||||
private readonly SeasonProvider _seasonProvider;
|
||||
private readonly ProwlProvider _prowlProvider;
|
||||
private readonly XbmcProvider _xbmcProvider;
|
||||
|
||||
public CommandController(JobProvider jobProvider, SabProvider sabProvider,
|
||||
SmtpProvider smtpProvider, TwitterProvider twitterProvider,
|
||||
EpisodeProvider episodeProvider, GrowlProvider growlProvider,
|
||||
SeasonProvider seasonProvider, ProwlProvider prowlProvider)
|
||||
SeasonProvider seasonProvider, ProwlProvider prowlProvider,
|
||||
XbmcProvider xbmcProvider)
|
||||
{
|
||||
_jobProvider = jobProvider;
|
||||
_sabProvider = sabProvider;
|
||||
|
@ -32,6 +34,7 @@ namespace NzbDrone.Web.Controllers
|
|||
_growlProvider = growlProvider;
|
||||
_seasonProvider = seasonProvider;
|
||||
_prowlProvider = prowlProvider;
|
||||
_xbmcProvider = xbmcProvider;
|
||||
}
|
||||
|
||||
public JsonResult RssSync()
|
||||
|
@ -164,5 +167,33 @@ namespace NzbDrone.Web.Controllers
|
|||
|
||||
return JsonNotificationResult.Info("Success!", "SABnzbd settings have been verified successfully! Version: " + version);
|
||||
}
|
||||
|
||||
public JsonResult TestXbmcNotification(string hosts)
|
||||
{
|
||||
try
|
||||
{
|
||||
_xbmcProvider.TestNotification(hosts);
|
||||
return JsonNotificationResult.Info("Success!", "Test Notification Sent Successfully");
|
||||
}
|
||||
catch(Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return JsonNotificationResult.Oops("Failed to send test notification, please review your settings.");
|
||||
}
|
||||
|
||||
public JsonResult TestXbmcJsonApi(string hosts, string username, string password)
|
||||
{
|
||||
try
|
||||
{
|
||||
_xbmcProvider.TestJsonApi(hosts, username, password);
|
||||
return JsonNotificationResult.Info("Success!", "Successfully tested JSON API");
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
|
||||
return JsonNotificationResult.Oops("Failed to test JSON API, please review your settings.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue