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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user