mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-04-21 22:05:38 -04:00
Fixed: Don't attempt to fetch a release if the download client is disabled
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NLog;
|
||||
@@ -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));
|
||||
@@ -36,6 +37,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