|
|
@ -1,6 +1,7 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using FluentValidation.Results;
|
|
|
|
using NLog;
|
|
|
|
using NLog;
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
using NzbDrone.Core.Messaging.Events;
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
|
using NzbDrone.Core.ThingiProvider;
|
|
|
@ -77,5 +78,26 @@ namespace NzbDrone.Core.ImportLists
|
|
|
|
yield return importList;
|
|
|
|
yield return importList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public override ValidationResult Test(ImportListDefinition definition)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var result = base.Test(definition);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (definition.Id == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result == null || result.IsValid)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_importListStatusService.RecordSuccess(definition.Id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
_importListStatusService.RecordFailure(definition.Id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|