|
|
@ -10,6 +10,7 @@ namespace NzbDrone.Core.ThingiProvider.Status
|
|
|
|
public interface IProviderStatusServiceBase<TModel>
|
|
|
|
public interface IProviderStatusServiceBase<TModel>
|
|
|
|
where TModel : ProviderStatusBase, new()
|
|
|
|
where TModel : ProviderStatusBase, new()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool IsDisabled(int providerId);
|
|
|
|
List<TModel> GetBlockedProviders();
|
|
|
|
List<TModel> GetBlockedProviders();
|
|
|
|
void RecordSuccess(int providerId);
|
|
|
|
void RecordSuccess(int providerId);
|
|
|
|
void RecordFailure(int providerId, TimeSpan minimumBackOff = default(TimeSpan));
|
|
|
|
void RecordFailure(int providerId, TimeSpan minimumBackOff = default(TimeSpan));
|
|
|
@ -37,6 +38,11 @@ namespace NzbDrone.Core.ThingiProvider.Status
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsDisabled(int providerId)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return GetProviderStatus(providerId).IsDisabled();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public virtual List<TModel> GetBlockedProviders()
|
|
|
|
public virtual List<TModel> GetBlockedProviders()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return _providerStatusRepository.All().Where(v => v.IsDisabled()).ToList();
|
|
|
|
return _providerStatusRepository.All().Where(v => v.IsDisabled()).ToList();
|
|
|
|