mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
Fixed: GetFilesByAlbum should only return files for monitored releases
Since switching releases doesn't clear out trackfiles for unmonitored releases, we need to ensure we only return files for monitored releases otherwise we will return duplicates
This commit is contained in:
parent
225af556d9
commit
ef3005f2bb
1 changed files with 3 additions and 1 deletions
|
@ -43,7 +43,9 @@ namespace NzbDrone.Core.MediaFiles
|
|||
public List<TrackFile> GetFilesByAlbum(int albumId)
|
||||
{
|
||||
return Query
|
||||
.Where(f => f.AlbumId == albumId)
|
||||
.Join<Track, AlbumRelease>(JoinType.Inner, t => t.AlbumRelease, (t, r) => t.AlbumReleaseId == r.Id)
|
||||
.Where<AlbumRelease>(r => r.Monitored == true)
|
||||
.AndWhere(f => f.AlbumId == albumId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue