mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-11 12:02:35 +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.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using NzbDrone.Core.Datastore;
|
using NzbDrone.Core.Datastore;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.Movies;
|
using NzbDrone.Core.Movies;
|
||||||
@ -32,7 +33,14 @@ public List<Blocklist> BlocklistedByTorrentInfoHash(int movieId, string torrentI
|
|||||||
|
|
||||||
public List<Blocklist> BlocklistedByMovie(int movieId)
|
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)
|
public void DeleteForMovies(List<int> movieIds)
|
||||||
|
Loading…
Reference in New Issue
Block a user