From bcc1e5ff6c28bb0f824a958aa9ee83b066ec89b1 Mon Sep 17 00:00:00 2001 From: chibidev Date: Fri, 21 Jul 2017 17:56:29 +0200 Subject: [PATCH] Fix OMDB key handling (#1581) --- src/Jackett/Controllers/AdminController.cs | 1 + src/Jackett/Services/IndexerManagerService.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Jackett/Controllers/AdminController.cs b/src/Jackett/Controllers/AdminController.cs index 420f22f14..bfc594921 100644 --- a/src/Jackett/Controllers/AdminController.cs +++ b/src/Jackett/Controllers/AdminController.cs @@ -378,6 +378,7 @@ namespace Jackett.Controllers if (omdbApiKey != Engine.Server.Config.OmdbApiKey) { Engine.Server.Config.OmdbApiKey = omdbApiKey; + Engine.Server.SaveConfig(); // HACK indexerService.InitAggregateIndexer(); } diff --git a/src/Jackett/Services/IndexerManagerService.cs b/src/Jackett/Services/IndexerManagerService.cs index 21be9200e..35563afe4 100644 --- a/src/Jackett/Services/IndexerManagerService.cs +++ b/src/Jackett/Services/IndexerManagerService.cs @@ -142,7 +142,7 @@ namespace Jackett.Services var omdbApiKey = Engine.Server.Config.OmdbApiKey; IFallbackStrategyProvider fallbackStrategyProvider = null; IResultFilterProvider resultFilterProvider = null; - if (omdbApiKey != null) + if (!omdbApiKey.IsNullOrEmptyOrWhitespace()) { var imdbResolver = new OmdbResolver(webClient, omdbApiKey.ToNonNull()); fallbackStrategyProvider = new ImdbFallbackStrategyProvider(imdbResolver);