1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-12 11:15:43 +02:00

Fixed: Avoid import loop for already imported episodes part of season packs

Closes #6075
This commit is contained in:
Bogdan 2023-10-29 00:45:47 +03:00 committed by GitHub
parent 59ea524e0c
commit b183743d9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -123,7 +123,7 @@ public void should_reject_if_episode_imported_after_being_grabbed()
GivenHistory(history);
Subject.IsSatisfiedBy(_localEpisode, _downloadClientItem).Accepted.Should().BeTrue();
Subject.IsSatisfiedBy(_localEpisode, _downloadClientItem).Accepted.Should().BeFalse();
}
}
}

View File

@ -67,6 +67,11 @@ public Decision IsSatisfiedBy(LocalEpisode localEpisode, DownloadClientItem down
return Decision.Reject("Episode file already imported at {0}", lastImported.Date.ToLocalTime());
}
}
else
{
_logger.Debug("Episode file previously imported at {0}", lastImported.Date);
return Decision.Reject("Episode file already imported at {0}", lastImported.Date.ToLocalTime());
}
}
return Decision.Accept();