New: Newznab providers will be rejected if they are not valid addresses.

Tests added for checking DNS.
This commit is contained in:
Mark McDowall 2012-05-11 10:26:56 -07:00
parent 7e5445fa3a
commit 7a80c81ffb
3 changed files with 47 additions and 3 deletions

View file

@ -391,8 +391,15 @@ namespace NzbDrone.Web.Controllers
_configProvider.FileSharingTalkUid = data.FileSharingTalkUid;
_configProvider.FileSharingTalkSecret = data.FileSharingTalkSecret;
if (data.NewznabDefinitions != null)
_newznabProvider.SaveAll(data.NewznabDefinitions);
try
{
if (data.NewznabDefinitions != null)
_newznabProvider.SaveAll(data.NewznabDefinitions);
}
catch(Exception)
{
return JsonNotificationResult.Oops("Invalid Nzbnab Indexer found, please check your settings");
}
return GetSuccessResult();
}