mirror of
https://github.com/Radarr/Radarr
synced 2025-12-10 10:22:41 +01:00
Fixed: Custom Format calculation error on Blocklist by Movie
Fixes #8136
This commit is contained in:
parent
31abb93d8c
commit
bae555f63e
1 changed files with 9 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NzbDrone.Core.Datastore;
|
||||
using NzbDrone.Core.Messaging.Events;
|
||||
using NzbDrone.Core.Movies;
|
||||
|
|
@ -32,7 +33,14 @@ public List<Blocklist> BlocklistedByTorrentInfoHash(int movieId, string torrentI
|
|||
|
||||
public List<Blocklist> BlocklistedByMovie(int movieId)
|
||||
{
|
||||
return Query(x => x.MovieId == movieId);
|
||||
var builder = Builder().Join<Blocklist, Movie>((h, a) => h.MovieId == a.Id)
|
||||
.Where<Blocklist>(h => h.MovieId == movieId);
|
||||
|
||||
return _database.QueryJoined<Blocklist, Movie>(builder, (blocklist, movie) =>
|
||||
{
|
||||
blocklist.Movie = movie;
|
||||
return blocklist;
|
||||
}).OrderByDescending(h => h.Date).ToList();
|
||||
}
|
||||
|
||||
public void DeleteForMovies(List<int> movieIds)
|
||||
|
|
|
|||
Loading…
Reference in a new issue