From 446a0591dbf25664435c36887e4f1d1c75c3e4d7 Mon Sep 17 00:00:00 2001 From: ta264 Date: Thu, 11 Feb 2021 21:06:42 +0000 Subject: [PATCH] Fixed: Duplicates in wanted page --- src/NzbDrone.Core/Books/Repositories/BookRepository.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/Books/Repositories/BookRepository.cs b/src/NzbDrone.Core/Books/Repositories/BookRepository.cs index a4dc07ed6..4ea01e1f9 100644 --- a/src/NzbDrone.Core/Books/Repositories/BookRepository.cs +++ b/src/NzbDrone.Core/Books/Repositories/BookRepository.cs @@ -94,6 +94,7 @@ namespace NzbDrone.Core.Books .Join((b, e) => b.Id == e.BookId) .LeftJoin((t, f) => t.Id == f.EditionId) .Where(f => f.Id == null) + .Where(e => e.Monitored == true) .Where(a => a.ReleaseDate <= currentTime); #pragma warning restore CS0472 @@ -111,6 +112,7 @@ namespace NzbDrone.Core.Books .Join((l, r) => l.AuthorMetadataId == r.AuthorMetadataId) .Join((b, e) => b.Id == e.BookId) .LeftJoin((t, f) => t.Id == f.EditionId) + .Where(e => e.Monitored == true) .Where(BuildQualityCutoffWhereClause(qualitiesBelowCutoff)); private string BuildQualityCutoffWhereClause(List qualitiesBelowCutoff) @@ -198,7 +200,8 @@ namespace NzbDrone.Core.Books return Query(Builder() .Join((b, e) => b.Id == e.BookId) .Join((t, f) => t.Id == f.EditionId) - .Where(x => x.AuthorMetadataId == author.AuthorMetadataId)); + .Where(x => x.AuthorMetadataId == author.AuthorMetadataId) + .Where(e => e.Monitored == true)); } } }