aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Rogers <1337joe@gmail.com>2023-12-17 22:14:11 -0500
committerJoe Rogers <1337joe@gmail.com>2023-12-17 22:14:11 -0500
commite91de654d78c847d482fb9ca315eca31d044d770 (patch)
tree5f38b007a1100dffcf38354bd557d377c1ff459d
parentf7479bc7301391d1aed9b2cb1104e501087bb6d6 (diff)
Stop saving Jellyfin API key in settings xml
-rw-r--r--MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs2
-rw-r--r--MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs6
2 files changed, 6 insertions, 2 deletions
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
index e9cd81a14..99b759ae2 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/Configuration/PluginConfiguration.cs
@@ -11,7 +11,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
/// Gets or sets a value to use as the API key for accessing TMDb. This is intentionally excluded from the
/// settings page as the API key should not need to be changed by most users.
/// </summary>
- public string TmdbApiKey { get; set; } = TmdbUtils.ApiKey;
+ public string TmdbApiKey { get; set; } = string.Empty;
/// <summary>
/// Gets or sets a value indicating whether include adult content when searching with TMDb.
diff --git a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
index 140210433..82f2c54f1 100644
--- a/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
+++ b/MediaBrowser.Providers/Plugins/Tmdb/TmdbClientManager.cs
@@ -36,7 +36,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
public TmdbClientManager(IMemoryCache memoryCache)
{
_memoryCache = memoryCache;
- _tmDbClient = new TMDbClient(Plugin.Instance.Configuration.TmdbApiKey);
+
+ var apiKey = Plugin.Instance.Configuration.TmdbApiKey;
+ apiKey = string.IsNullOrEmpty(apiKey) ? TmdbUtils.ApiKey : apiKey;
+ _tmDbClient = new TMDbClient(apiKey);
+
// Not really interested in NotFoundException
_tmDbClient.ThrowApiExceptions = false;
}