From 01746a06e07e278bb2fcaee6ae8b30dae3366d63 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Fri, 24 Feb 2012 16:53:01 -0800 Subject: [PATCH] Fixed Series/Details Quality column. --- .../PetaPoco/EpisodeSeasonRelator.cs | 6 +++++- NzbDrone.Core/Providers/SeasonProvider.cs | Bin 7972 -> 8086 bytes 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NzbDrone.Core/Datastore/PetaPoco/EpisodeSeasonRelator.cs b/NzbDrone.Core/Datastore/PetaPoco/EpisodeSeasonRelator.cs index 168e2920b..42ca1dc8d 100644 --- a/NzbDrone.Core/Datastore/PetaPoco/EpisodeSeasonRelator.cs +++ b/NzbDrone.Core/Datastore/PetaPoco/EpisodeSeasonRelator.cs @@ -9,7 +9,7 @@ namespace NzbDrone.Core.Datastore.PetaPoco public class EpisodeSeasonRelator { public Season _current; - public Season MapIt(Season season, Episode episode) + public Season MapIt(Season season, Episode episode, EpisodeFile episodeFile) { // Terminating call. Since we can return null from this function // we need to be ready for PetaPoco to callback later with null @@ -17,6 +17,10 @@ namespace NzbDrone.Core.Datastore.PetaPoco if (season == null) return _current; + //Todo: Find a Query that doesn't require this check + //Map EpisodeFile to Episode (Map to null if 0, because PetaPoco is returning a POCO when it should be null) + episode.EpisodeFile = (episode.EpisodeFileId == 0 ? null : episodeFile); + // Is this the same season as the current one we're processing if (_current != null && _current.SeasonId == season.SeasonId) { diff --git a/NzbDrone.Core/Providers/SeasonProvider.cs b/NzbDrone.Core/Providers/SeasonProvider.cs index bab22a116353e5978834b5d939e8ac8ffd3d87ab..2ce4148c3660fb5aeff0b602b52284d7c4eba99c 100644 GIT binary patch delta 118 zcmZ2tH_d*-H$E=cg3RLllvKCOoXwy47#Tx-T-`zx{6j-rgA}~{J^d6A@~OoN{-}IC bBuUQ{1zVWnVpIuUuE~4YB{u)z*Wd>L!Eq^n delta 20 ccmbPczr=3CH@?Zt{QoAOVdvPKC!oO(0A4Ex