1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-24 22:35:49 -04:00

Provider testing improvements

New: Test button for indexers in UI

Fixed: Testing download clients shows error messages in UI
Fixed: Testing notifications shows error messages in UI
This commit is contained in:
Mark McDowall
2014-07-04 01:09:48 -07:00
parent c5bd8b27fb
commit 7af782d353
70 changed files with 727 additions and 591 deletions
@@ -1,14 +1,17 @@
using NzbDrone.Core.Tv;
using System.Collections.Generic;
using FluentValidation.Results;
using NzbDrone.Common;
using NzbDrone.Core.Tv;
namespace NzbDrone.Core.Notifications.Plex
{
public class PlexServer : NotificationBase<PlexServerSettings>
{
private readonly IPlexService _plexProvider;
private readonly IPlexService _plexService;
public PlexServer(IPlexService plexProvider)
public PlexServer(IPlexService plexService)
{
_plexProvider = plexProvider;
_plexService = plexService;
}
public override string Link
@@ -34,8 +37,17 @@ namespace NzbDrone.Core.Notifications.Plex
{
if (Settings.UpdateLibrary)
{
_plexProvider.UpdateLibrary(Settings);
_plexService.UpdateLibrary(Settings);
}
}
public override ValidationResult Test()
{
var failures = new List<ValidationFailure>();
failures.AddIfNotNull(_plexService.Test(Settings));
return new ValidationResult(failures);
}
}
}