mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-16 15:29:40 +02:00
Fixed: Custom Format calculation error on Blocklist by Movie
Fixes #8136
This commit is contained in:
parent
31abb93d8c
commit
bae555f63e
@ -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 New Issue
Block a user