From 5bdc119b980f6c13a609f35a6c337a0d4e70d09c Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 27 Mar 2025 19:47:03 +0200 Subject: [PATCH] Fixed: Include Track for history/since Fixes #5421 --- src/NzbDrone.Core/History/EntityHistoryRepository.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/History/EntityHistoryRepository.cs b/src/NzbDrone.Core/History/EntityHistoryRepository.cs index 4b66c88b7..5c659724d 100644 --- a/src/NzbDrone.Core/History/EntityHistoryRepository.cs +++ b/src/NzbDrone.Core/History/EntityHistoryRepository.cs @@ -104,6 +104,7 @@ namespace NzbDrone.Core.History var builder = Builder() .Join((h, a) => h.ArtistId == a.Id) .Join((h, a) => h.AlbumId == a.Id) + .LeftJoin((h, t) => h.TrackId == t.Id) .Where(x => x.Date >= date); if (eventType.HasValue) @@ -111,10 +112,11 @@ namespace NzbDrone.Core.History builder.Where(h => h.EventType == eventType); } - return _database.QueryJoined(builder, (history, artist, album) => + return _database.QueryJoined(builder, (history, artist, album, track) => { history.Artist = artist; history.Album = album; + history.Track = track; return history; }).OrderBy(h => h.Date).ToList(); }