From 8cbd61d27e877b2e4275e61f7a6df0f83b7ad41e Mon Sep 17 00:00:00 2001 From: crobibero Date: Wed, 18 Nov 2020 10:51:59 -0700 Subject: [PATCH 1/2] Fix config html --- Jellyfin.Plugin.Tvdb/Configuration/config.html | 10 ++++++---- Jellyfin.Plugin.Tvdb/TvdbClientManager.cs | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Plugin.Tvdb/Configuration/config.html b/Jellyfin.Plugin.Tvdb/Configuration/config.html index ee50e2d..2414716 100644 --- a/Jellyfin.Plugin.Tvdb/Configuration/config.html +++ b/Jellyfin.Plugin.Tvdb/Configuration/config.html @@ -36,21 +36,23 @@

TheTVDB Settings:

uniquePluginId: "a677c0da-fac5-4cde-941a-7134223f14c8", loadConfiguration: function () { + console.warn("load configuration"); 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(); }); }, saveConfiguration: function () { + console.warn("save configuration"); 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; From 43a1e76c06d687c34b73fa14e5901238971116c9 Mon Sep 17 00:00:00 2001 From: crobibero Date: Wed, 18 Nov 2020 10:52:35 -0700 Subject: [PATCH 2/2] remove debug logging --- Jellyfin.Plugin.Tvdb/Configuration/config.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/Jellyfin.Plugin.Tvdb/Configuration/config.html b/Jellyfin.Plugin.Tvdb/Configuration/config.html index 2414716..46d91b6 100644 --- a/Jellyfin.Plugin.Tvdb/Configuration/config.html +++ b/Jellyfin.Plugin.Tvdb/Configuration/config.html @@ -36,7 +36,6 @@

TheTVDB Settings:

uniquePluginId: "a677c0da-fac5-4cde-941a-7134223f14c8", loadConfiguration: function () { - console.warn("load configuration"); Dashboard.showLoadingMsg(); ApiClient.getPluginConfiguration(TvdbPluginConfiguration.uniquePluginId).then(function (config) { @@ -46,7 +45,6 @@

TheTVDB Settings:

}, saveConfiguration: function () { - console.warn("save configuration"); Dashboard.showLoadingMsg(); ApiClient.getPluginConfiguration(TvdbPluginConfiguration.uniquePluginId).then(function (config) {