From 727c7be9f29f42fd80ff0c473a65bff7228051e4 Mon Sep 17 00:00:00 2001 From: "Jamie.Rees" Date: Thu, 19 Oct 2017 09:00:59 +0100 Subject: [PATCH] Added another place to make sure we have the correct poster paths !minor --- src/Ombi.Core/Engine/MovieRequestEngine.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Core/Engine/MovieRequestEngine.cs b/src/Ombi.Core/Engine/MovieRequestEngine.cs index 353624ec3..6762c47b9 100644 --- a/src/Ombi.Core/Engine/MovieRequestEngine.cs +++ b/src/Ombi.Core/Engine/MovieRequestEngine.cs @@ -64,7 +64,7 @@ namespace Ombi.Core.Engine RequestType = RequestType.Movie, Overview = movieInfo.Overview, ImdbId = movieInfo.ImdbId, - PosterPath = PosterPathHelper.FixPosterPath(movieInfo.PosterPath.TrimStart('/')), + PosterPath = PosterPathHelper.FixPosterPath(movieInfo.PosterPath), Title = movieInfo.Title, ReleaseDate = !string.IsNullOrEmpty(movieInfo.ReleaseDate) ? DateTime.Parse(movieInfo.ReleaseDate) @@ -80,7 +80,7 @@ namespace Ombi.Core.Engine { return new RequestEngineResult { - ErrorMessage = ruleResults.FirstOrDefault(x => !string.IsNullOrEmpty(x.Message)).Message + ErrorMessage = ruleResults.FirstOrDefault(x => x.Message.HasValue()).Message }; } @@ -117,6 +117,7 @@ namespace Ombi.Core.Engine public async Task> GetRequests(int count, int position) { var allRequests = await MovieRepository.Get().Skip(position).Take(count).ToListAsync(); + allRequests.ForEach(x => PosterPathHelper.FixPosterPath(x.PosterPath)); return allRequests; }