From 6406ed62897368fd9d34169d20d9e254615a59d0 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 27 Mar 2025 19:51:00 +0200 Subject: [PATCH] Fixed: Include Book for history/since Fixes #4011 --- src/NzbDrone.Core/History/HistoryRepository.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/History/HistoryRepository.cs b/src/NzbDrone.Core/History/HistoryRepository.cs index 28e704837..646611097 100644 --- a/src/NzbDrone.Core/History/HistoryRepository.cs +++ b/src/NzbDrone.Core/History/HistoryRepository.cs @@ -116,6 +116,7 @@ namespace NzbDrone.Core.History { var builder = Builder() .Join((h, a) => h.AuthorId == a.Id) + .LeftJoin((h, b) => h.BookId == b.Id) .Where(x => x.Date >= date); if (eventType.HasValue) @@ -123,9 +124,10 @@ namespace NzbDrone.Core.History builder.Where(h => h.EventType == eventType); } - return _database.QueryJoined(builder, (history, author) => + return _database.QueryJoined(builder, (history, author, book) => { history.Author = author; + history.Book = book; return history; }).OrderBy(h => h.Date).ToList(); }