mirror of
https://github.com/Radarr/Radarr
synced 2025-02-23 14:51:17 +00:00
Fixed: Blocking unknown indexers from pushed releases
(cherry picked from commit 44d8dbaac81706691124ae5f8317289f0a3e5d73)
This commit is contained in:
parent
a4b7c99d91
commit
da41cb8840
2 changed files with 16 additions and 0 deletions
|
@ -68,5 +68,16 @@ public void should_not_store_update_if_already_okay()
|
||||||
|
|
||||||
VerifyNoUpdate();
|
VerifyNoUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void should_not_record_failure_for_unknown_provider()
|
||||||
|
{
|
||||||
|
Subject.RecordFailure(0);
|
||||||
|
|
||||||
|
Mocker.GetMock<IIndexerStatusRepository>()
|
||||||
|
.Verify(v => v.FindByProviderId(1), Times.Never);
|
||||||
|
|
||||||
|
VerifyNoUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -79,6 +79,11 @@ public virtual void RecordSuccess(int providerId)
|
||||||
|
|
||||||
protected virtual void RecordFailure(int providerId, TimeSpan minimumBackOff, bool escalate)
|
protected virtual void RecordFailure(int providerId, TimeSpan minimumBackOff, bool escalate)
|
||||||
{
|
{
|
||||||
|
if (providerId <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
lock (_syncRoot)
|
lock (_syncRoot)
|
||||||
{
|
{
|
||||||
var status = GetProviderStatus(providerId);
|
var status = GetProviderStatus(providerId);
|
||||||
|
|
Loading…
Reference in a new issue