|
|
@ -16,7 +16,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
|
|
|
void Notify(XbmcSettings settings, string title, string message);
|
|
|
|
void Notify(XbmcSettings settings, string title, string message);
|
|
|
|
void Update(XbmcSettings settings, Series series);
|
|
|
|
void Update(XbmcSettings settings, Series series);
|
|
|
|
void Clean(XbmcSettings settings);
|
|
|
|
void Clean(XbmcSettings settings);
|
|
|
|
ValidationFailure Test(XbmcSettings settings);
|
|
|
|
ValidationFailure Test(XbmcSettings settings, string message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public class XbmcService : IXbmcService
|
|
|
|
public class XbmcService : IXbmcService
|
|
|
@ -101,13 +101,13 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
|
|
|
return apiProvider;
|
|
|
|
return apiProvider;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public ValidationFailure Test(XbmcSettings settings)
|
|
|
|
public ValidationFailure Test(XbmcSettings settings, string message)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_xbmcVersionCache.Clear();
|
|
|
|
_xbmcVersionCache.Clear();
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_logger.Debug("Determining version of XBMC Host: {0}", settings.Address);
|
|
|
|
_logger.Debug("Determining version of Host: {0}", settings.Address);
|
|
|
|
var version = GetJsonVersion(settings);
|
|
|
|
var version = GetJsonVersion(settings);
|
|
|
|
_logger.Debug("Version is: {0}", version);
|
|
|
|
_logger.Debug("Version is: {0}", version);
|
|
|
|
|
|
|
|
|
|
|
@ -116,7 +116,7 @@ namespace NzbDrone.Core.Notifications.Xbmc
|
|
|
|
throw new InvalidXbmcVersionException("Version received from XBMC is invalid, please correct your settings.");
|
|
|
|
throw new InvalidXbmcVersionException("Version received from XBMC is invalid, please correct your settings.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Notify(settings, "Test Notification", "Success! XBMC has been successfully configured!");
|
|
|
|
Notify(settings, "Test Notification", message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|