mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04:00
Fixed: Don't attempt to fetch a release if the download client is disabled
This commit is contained in:
@@ -10,6 +10,7 @@ namespace NzbDrone.Core.ThingiProvider.Status
|
||||
public interface IProviderStatusServiceBase<TModel>
|
||||
where TModel : ProviderStatusBase, new()
|
||||
{
|
||||
bool IsDisabled(int providerId);
|
||||
List<TModel> GetBlockedProviders();
|
||||
void RecordSuccess(int providerId);
|
||||
void RecordFailure(int providerId, TimeSpan minimumBackOff = default(TimeSpan));
|
||||
@@ -37,6 +38,11 @@ namespace NzbDrone.Core.ThingiProvider.Status
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public bool IsDisabled(int providerId)
|
||||
{
|
||||
return GetProviderStatus(providerId).IsDisabled();
|
||||
}
|
||||
|
||||
public virtual List<TModel> GetBlockedProviders()
|
||||
{
|
||||
return _providerStatusRepository.All().Where(v => v.IsDisabled()).ToList();
|
||||
|
||||
Reference in New Issue
Block a user