1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-23 22:25:14 -04:00

Fixed: Blocklisting torrents from indexers that do not provide torrent hash

(cherry picked from commit 3541cd7ba877fb785c7f97123745abf51162eb8e)
This commit is contained in:
Mark McDowall
2023-10-29 11:23:23 -07:00
committed by Bogdan
parent c1feeb72ee
commit ef8253044e
37 changed files with 170 additions and 90 deletions
@@ -15,6 +15,7 @@ namespace NzbDrone.Core.Blocklisting
public interface IBlocklistService
{
bool Blocklisted(int movieId, ReleaseInfo release);
bool BlocklistedTorrentHash(int movieId, string hash);
PagingSpec<Blocklist> Paged(PagingSpec<Blocklist> pagingSpec);
List<Blocklist> GetByMovieId(int movieId);
void Block(RemoteMovie remoteMovie, string message);
@@ -63,6 +64,12 @@ namespace NzbDrone.Core.Blocklisting
.Any(b => SameNzb(b, release));
}
public bool BlocklistedTorrentHash(int movieId, string hash)
{
return _blocklistRepository.BlocklistedByTorrentInfoHash(movieId, hash).Any(b =>
b.TorrentInfoHash.Equals(hash, StringComparison.InvariantCultureIgnoreCase));
}
public PagingSpec<Blocklist> Paged(PagingSpec<Blocklist> pagingSpec)
{
return _blocklistRepository.GetPaged(pagingSpec);