1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-29 19:35:25 +00:00

Fixed: Show better error message when TV library isn't added to Plex server

This commit is contained in:
Mark McDowall 2015-01-03 23:25:11 -08:00
parent 90ce35abee
commit c5d4948d2a

View file

@ -3,6 +3,7 @@
using System.Linq;
using FluentValidation.Results;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Http;
namespace NzbDrone.Core.Notifications.Plex
@ -110,15 +111,17 @@ public ValidationFailure Test(PlexServerSettings settings)
{
try
{
if (!GetSectionKeys(new PlexServerSettings
var sections = GetSectionKeys(new PlexServerSettings
{
Host = settings.Host,
Port = settings.Port,
Username = settings.Username,
Password = settings.Password
});
if (sections.Empty())
{
Host = settings.Host,
Port = settings.Port,
Username = settings.Username,
Password = settings.Password
}).Any())
{
throw new Exception("Unable to connect to Plex Server");
return new ValidationFailure("Host", "At least one TV library is required");
}
}
catch (Exception ex)