diff --git a/Jellyfin.Plugin.Tvdb/Configuration/config.html b/Jellyfin.Plugin.Tvdb/Configuration/config.html
index ee50e2d..46d91b6 100644
--- a/Jellyfin.Plugin.Tvdb/Configuration/config.html
+++ b/Jellyfin.Plugin.Tvdb/Configuration/config.html
@@ -38,8 +38,8 @@
TheTVDB Settings:
loadConfiguration: function () {
Dashboard.showLoadingMsg();
- ApiClient.getPluginConfiguration(TvdbPluginConfiguration.pluginUniqueId).then(function (config) {
- document.getElementById('txtTvdbApiKey').value = config.ApiKey;
+ ApiClient.getPluginConfiguration(TvdbPluginConfiguration.uniquePluginId).then(function (config) {
+ document.getElementById('txtTvdbApiKey').value = config.ApiKey || '';
Dashboard.hideLoadingMsg();
});
},
@@ -47,10 +47,10 @@ TheTVDB Settings:
saveConfiguration: function () {
Dashboard.showLoadingMsg();
- ApiClient.getPluginConfiguration(TvdbPluginConfiguration.pluginUniqueId).then(function (config) {
+ ApiClient.getPluginConfiguration(TvdbPluginConfiguration.uniquePluginId).then(function (config) {
config.ApiKey = document.getElementById('txtTvdbApiKey').value;
- ApiClient.updatePluginConfiguration(TvdbPluginConfiguration.pluginUniqueId, config).then(function (result) {
+ ApiClient.updatePluginConfiguration(TvdbPluginConfiguration.uniquePluginId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});
});
diff --git a/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs b/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs
index 056aac7..d2230e8 100644
--- a/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs
+++ b/Jellyfin.Plugin.Tvdb/TvdbClientManager.cs
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
+using System.Net.Http;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;