Stop saving Jellyfin API key in settings xml

pull/10737/head
Joe Rogers 1 year ago
parent f7479bc730
commit e91de654d7
No known key found for this signature in database
GPG Key ID: 0074AD57B8FDBBB4

@ -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 /// 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. /// settings page as the API key should not need to be changed by most users.
/// </summary> /// </summary>
public string TmdbApiKey { get; set; } = TmdbUtils.ApiKey; public string TmdbApiKey { get; set; } = string.Empty;
/// <summary> /// <summary>
/// Gets or sets a value indicating whether include adult content when searching with TMDb. /// Gets or sets a value indicating whether include adult content when searching with TMDb.

@ -36,7 +36,11 @@ namespace MediaBrowser.Providers.Plugins.Tmdb
public TmdbClientManager(IMemoryCache memoryCache) public TmdbClientManager(IMemoryCache memoryCache)
{ {
_memoryCache = 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 // Not really interested in NotFoundException
_tmDbClient.ThrowApiExceptions = false; _tmDbClient.ThrowApiExceptions = false;
} }

Loading…
Cancel
Save