mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-06 04:52:21 -07:00
parent
1b9b57ae9b
commit
5bdc119b98
1 changed files with 3 additions and 1 deletions
|
@ -104,6 +104,7 @@ namespace NzbDrone.Core.History
|
||||||
var builder = Builder()
|
var builder = Builder()
|
||||||
.Join<EntityHistory, Artist>((h, a) => h.ArtistId == a.Id)
|
.Join<EntityHistory, Artist>((h, a) => h.ArtistId == a.Id)
|
||||||
.Join<EntityHistory, Album>((h, a) => h.AlbumId == a.Id)
|
.Join<EntityHistory, Album>((h, a) => h.AlbumId == a.Id)
|
||||||
|
.LeftJoin<EntityHistory, Track>((h, t) => h.TrackId == t.Id)
|
||||||
.Where<EntityHistory>(x => x.Date >= date);
|
.Where<EntityHistory>(x => x.Date >= date);
|
||||||
|
|
||||||
if (eventType.HasValue)
|
if (eventType.HasValue)
|
||||||
|
@ -111,10 +112,11 @@ namespace NzbDrone.Core.History
|
||||||
builder.Where<EntityHistory>(h => h.EventType == eventType);
|
builder.Where<EntityHistory>(h => h.EventType == eventType);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _database.QueryJoined<EntityHistory, Artist, Album>(builder, (history, artist, album) =>
|
return _database.QueryJoined<EntityHistory, Artist, Album, Track>(builder, (history, artist, album, track) =>
|
||||||
{
|
{
|
||||||
history.Artist = artist;
|
history.Artist = artist;
|
||||||
history.Album = album;
|
history.Album = album;
|
||||||
|
history.Track = track;
|
||||||
return history;
|
return history;
|
||||||
}).OrderBy(h => h.Date).ToList();
|
}).OrderBy(h => h.Date).ToList();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue