From 995a1dddb5fe729a72f29a779fba348764b92ba6 Mon Sep 17 00:00:00 2001 From: crobibero Date: Wed, 2 Dec 2020 17:07:32 -0700 Subject: [PATCH 1/5] Target 10.7 --- Jellyfin.Plugin.Template/Jellyfin.Plugin.Template.csproj | 2 +- build.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jellyfin.Plugin.Template/Jellyfin.Plugin.Template.csproj b/Jellyfin.Plugin.Template/Jellyfin.Plugin.Template.csproj index cb721f6..5e75639 100644 --- a/Jellyfin.Plugin.Template/Jellyfin.Plugin.Template.csproj +++ b/Jellyfin.Plugin.Template/Jellyfin.Plugin.Template.csproj @@ -1,7 +1,7 @@ - netstandard2.1 + net5.0 Jellyfin.Plugin.Template 1.0.0.0 1.0.0.0 diff --git a/build.yaml b/build.yaml index 36cc605..ed3ed03 100644 --- a/build.yaml +++ b/build.yaml @@ -2,7 +2,8 @@ name: "Template" guid: "eb5d7894-8eef-4b36-aa6f-5d124e828ce1" version: "1.0.0.0" -targetAbi: "10.6.0.0" +targetAbi: "10.7.0.0" +framework: "net5.0" overview: "Short description about your plugin" description: > This is a longer description that can span more than one From 83e5ce657a77f7eae0aea9dece34b83f939d6a61 Mon Sep 17 00:00:00 2001 From: crobibero Date: Wed, 2 Dec 2020 17:47:22 -0700 Subject: [PATCH 2/5] Remove JQuery --- .../Configuration/configPage.html | 32 ++++++++++--------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/Jellyfin.Plugin.Template/Configuration/configPage.html b/Jellyfin.Plugin.Template/Configuration/configPage.html index 02d1d8a..d2cc1bd 100644 --- a/Jellyfin.Plugin.Template/Configuration/configPage.html +++ b/Jellyfin.Plugin.Template/Configuration/configPage.html @@ -45,24 +45,26 @@ pluginUniqueId: 'eb5d7894-8eef-4b36-aa6f-5d124e828ce1' }; - $('#TemplateConfigPage').on('pageshow', function () { + document.querySelector('#TemplateConfigPage') + .addEventListener('pageshow', function(){ + Dashboard.showLoadingMsg(); + ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) { + document.querySelector('#Options').value = config.Options; + document.querySelector('#AnInteger').value = config.AnInteger; + document.getElementById('TrueFalseSetting').checked = config.TrueFalseSetting; + document.querySelector('#AString').value = config.AString; + Dashboard.hideLoadingMsg(); + }); + }) + + document.querySelector('#TemplateConfigForm') + .addEventListener('submit', function() { Dashboard.showLoadingMsg(); ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) { - $('#Options').val(config.Options).change(); - $('#AnInteger').val(config.AnInteger).change(); - document.getElementById('TrueFalseSetting').checked = config.TrueFalseSetting; - $('#AString').val(config.AString).change(); - Dashboard.hideLoadingMsg(); - }); - }); - - $('#TemplateConfigForm').on('submit', function () { - Dashboard.showLoadingMsg(); - ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) { - config.Options = $('#Options').val(); - config.AnInteger = $('#AnInteger').val(); + config.Options = document.querySelector('#Options').value; + config.AnInteger = document.querySelector('#AnInteger').value; config.TrueFalseSetting = document.getElementById('TrueFalseSetting').checked; - config.AString = $('#AString').val(); + config.AString = document.querySelector('#AString').value; ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) { Dashboard.processPluginConfigurationUpdateResult(result); }); From ad597d71e15d0512b63d9472b852c234ea1a7325 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Thu, 3 Dec 2020 07:18:13 -0700 Subject: [PATCH 3/5] Update Jellyfin.Plugin.Template/Configuration/configPage.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Odd Stråbø --- Jellyfin.Plugin.Template/Configuration/configPage.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Plugin.Template/Configuration/configPage.html b/Jellyfin.Plugin.Template/Configuration/configPage.html index d2cc1bd..2c8c9c6 100644 --- a/Jellyfin.Plugin.Template/Configuration/configPage.html +++ b/Jellyfin.Plugin.Template/Configuration/configPage.html @@ -51,7 +51,7 @@ ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) { document.querySelector('#Options').value = config.Options; document.querySelector('#AnInteger').value = config.AnInteger; - document.getElementById('TrueFalseSetting').checked = config.TrueFalseSetting; + document.querySelector('#TrueFalseSetting').checked = config.TrueFalseSetting; document.querySelector('#AString').value = config.AString; Dashboard.hideLoadingMsg(); }); From fa2f1fc1d6d516a6d740fca9adb9eb9475738fc4 Mon Sep 17 00:00:00 2001 From: Cody Robibero Date: Thu, 3 Dec 2020 07:18:19 -0700 Subject: [PATCH 4/5] Update Jellyfin.Plugin.Template/Configuration/configPage.html MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Odd Stråbø --- Jellyfin.Plugin.Template/Configuration/configPage.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jellyfin.Plugin.Template/Configuration/configPage.html b/Jellyfin.Plugin.Template/Configuration/configPage.html index 2c8c9c6..640a863 100644 --- a/Jellyfin.Plugin.Template/Configuration/configPage.html +++ b/Jellyfin.Plugin.Template/Configuration/configPage.html @@ -63,7 +63,7 @@ ApiClient.getPluginConfiguration(TemplateConfig.pluginUniqueId).then(function (config) { config.Options = document.querySelector('#Options').value; config.AnInteger = document.querySelector('#AnInteger').value; - config.TrueFalseSetting = document.getElementById('TrueFalseSetting').checked; + config.TrueFalseSetting = document.querySelector('#TrueFalseSetting').checked; config.AString = document.querySelector('#AString').value; ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) { Dashboard.processPluginConfigurationUpdateResult(result); From 50468fd1080ec13e3b3dc77b23ff054f1b21aff0 Mon Sep 17 00:00:00 2001 From: crobibero Date: Thu, 3 Dec 2020 07:52:32 -0700 Subject: [PATCH 5/5] Update dotnet sdk version and remove IIsoManager --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 1fdff16..734ab14 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Awesome! This guide is for you. Jellyfin plugins are written using the dotnet st ## 0. Things you need to get started -- [Dotnet Core SDK 2.2](https://dotnet.microsoft.com/download) +- [Dotnet SDK 5.0](https://dotnet.microsoft.com/download) - An editor of your choice. Some free choices are: @@ -133,7 +133,6 @@ Likewise you might need to get data and services from the Jellyfin core, Jellyfi - **IBlurayExaminer** - Allows you to examine blu-ray folders - **IDtoService** - Allows you to create data transport objects, presumably to send to other plugins or to the core -- **IIsoManager** - Allows the mounting and unmounting of ISO files - **IJsonSerializer** - Allows you to use the main json serializer - **ILibraryManager** - Allows you to directly access the media libraries without hopping through the API - **ILocalizationManager** - Allows you tap into the main localization engine which governs translations, rating systems, units etc...