mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-20 21:54:25 -04:00
Fixed: MediaFileRepository was ignoring AlbumRelease monitored flag (#689)
This commit is contained in:
@@ -34,7 +34,7 @@ namespace NzbDrone.Core.MediaFiles
|
||||
public List<TrackFile> GetFilesByArtist(int artistId)
|
||||
{
|
||||
return Query
|
||||
.Join<Album, AlbumRelease>(JoinType.Inner, a => a.AlbumReleases, (a, r) => a.Id == r.AlbumId)
|
||||
.Join<Track, AlbumRelease>(JoinType.Inner, t => t.AlbumRelease, (t, r) => t.AlbumReleaseId == r.Id)
|
||||
.Where<AlbumRelease>(r => r.Monitored == true)
|
||||
.AndWhere(t => t.Artist.Value.Id == artistId)
|
||||
.ToList();
|
||||
@@ -58,10 +58,9 @@ namespace NzbDrone.Core.MediaFiles
|
||||
public List<TrackFile> GetFilesWithRelativePath(int artistId, string relativePath)
|
||||
{
|
||||
return Query
|
||||
.Join<Album, AlbumRelease>(JoinType.Inner, a => a.AlbumReleases, (a, r) => a.Id == r.AlbumId)
|
||||
.Join<Track, AlbumRelease>(JoinType.Inner, t => t.AlbumRelease, (t, r) => t.AlbumReleaseId == r.Id)
|
||||
.Where<AlbumRelease>(r => r.Monitored == true)
|
||||
.AndWhere(t => t.Artist.Value.Id == artistId)
|
||||
.AndWhere(t => t.RelativePath == relativePath)
|
||||
.AndWhere(t => t.Artist.Value.Id == artistId && t.RelativePath == relativePath)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user