From 55550f1b30d69b671b09056dd3adfc32ddcdd073 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Fri, 3 Nov 2017 21:04:52 +0000 Subject: [PATCH] Fixed #1663 --- src/Ombi.Core/Engine/MovieSearchEngine.cs | 9 ++------- src/Ombi/Controllers/ImagesController.cs | 10 +++++++++- src/Ombi/appsettings.json | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Ombi.Core/Engine/MovieSearchEngine.cs b/src/Ombi.Core/Engine/MovieSearchEngine.cs index 64a05a2d5..db67bdee5 100644 --- a/src/Ombi.Core/Engine/MovieSearchEngine.cs +++ b/src/Ombi.Core/Engine/MovieSearchEngine.cs @@ -159,15 +159,10 @@ namespace Ombi.Core.Engine viewMovie.ImdbId = showInfo.ImdbId; } - // So when we run the rule to check if it's available in Plex we need the ImdbId - // But we only pass down the SearchViewModel that doesn't contain this - // So set the ImdbId to viewMovie.Id and then set it back afterwards - var oldId = viewMovie.Id; - viewMovie.TheMovieDbId = viewMovie.TheMovieDbId; + viewMovie.TheMovieDbId = viewMovie.Id.ToString(); await RunSearchRules(viewMovie); - - viewMovie.Id = oldId; + return viewMovie; } diff --git a/src/Ombi/Controllers/ImagesController.cs b/src/Ombi/Controllers/ImagesController.cs index 6efd2f83c..a9d76a3ed 100644 --- a/src/Ombi/Controllers/ImagesController.cs +++ b/src/Ombi/Controllers/ImagesController.cs @@ -41,7 +41,15 @@ namespace Ombi.Controllers }); var images = await Api.GetTvImages(tvdbid, key.Value); - return images.tvbanner.FirstOrDefault()?.url ?? string.Empty; + if (images.tvbanner != null) + { + return images.tvbanner.FirstOrDefault()?.url ?? string.Empty; + } + if (images.showbackground != null) + { + return images.showbackground.FirstOrDefault()?.url ?? string.Empty; + } + return string.Empty; } [HttpGet("background")] diff --git a/src/Ombi/appsettings.json b/src/Ombi/appsettings.json index 16cee5778..fbfad7f52 100644 --- a/src/Ombi/appsettings.json +++ b/src/Ombi/appsettings.json @@ -18,7 +18,7 @@ "UseHttps": false }, "TokenAuthentication": { - "SecretKey": "secretkey_secretkey123!" + "SecretKey": "secretkey_secretkey1234!" }, "LandingPageBackground": { "Movies": [