From de5fa4b8ea90115599d4f9a78fcbca368904212e Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 10 Mar 2019 08:53:30 +0900 Subject: [PATCH 1/5] small code formatting changes --- .../Configuration/PluginConfiguration.cs | 13 ++--- example-plugin/Configuration/configPage.html | 51 +++++++------------ example-plugin/Plugin.cs | 13 +++-- example-plugin/example-jellyfin-plugin.csproj | 2 +- 4 files changed, 31 insertions(+), 48 deletions(-) diff --git a/example-plugin/Configuration/PluginConfiguration.cs b/example-plugin/Configuration/PluginConfiguration.cs index 04175e5..3c38058 100644 --- a/example-plugin/Configuration/PluginConfiguration.cs +++ b/example-plugin/Configuration/PluginConfiguration.cs @@ -1,5 +1,6 @@ using MediaBrowser.Model.Plugins; -namespace Jellyfin.Plugin.ExamplePlugin.Configuration + +namespace Jellyfin.Plugin.Template.Configuration { public enum SomeOptions { @@ -9,10 +10,10 @@ namespace Jellyfin.Plugin.ExamplePlugin.Configuration public class PluginConfiguration : BasePluginConfiguration { //This is where you should store configurable settings your plugin might need. - public bool TrueFalseSetting {get; set;} - public int AnInteger {get; set;} - public string AString {get; set;} - public SomeOptions Options {get; set;} + public bool TrueFalseSetting { get; set; } + public int AnInteger { get; set; } + public string AString { get; set; } + public SomeOptions Options { get; set; } public PluginConfiguration() { Options = SomeOptions.AnotherOption; @@ -21,4 +22,4 @@ namespace Jellyfin.Plugin.ExamplePlugin.Configuration AString = "This is a string setting"; } } -} \ No newline at end of file +} diff --git a/example-plugin/Configuration/configPage.html b/example-plugin/Configuration/configPage.html index c94a318..aaeaedb 100644 --- a/example-plugin/Configuration/configPage.html +++ b/example-plugin/Configuration/configPage.html @@ -1,5 +1,4 @@ - @@ -9,28 +8,27 @@
-
- +
- - + +
Numbers go here
- +
Words go here
@@ -42,38 +40,23 @@
-
- - \ No newline at end of file + + diff --git a/example-plugin/Plugin.cs b/example-plugin/Plugin.cs index b2e1010..a50da7f 100644 --- a/example-plugin/Plugin.cs +++ b/example-plugin/Plugin.cs @@ -1,17 +1,16 @@ using System; using System.Collections.Generic; -using Jellyfin.Plugin.ExamplePlugin.Configuration; +using Jellyfin.Plugin.Template.Configuration; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Plugins; using MediaBrowser.Model.Plugins; using MediaBrowser.Model.Serialization; -namespace Jellyfin.Plugin.ExamplePlugin +namespace Jellyfin.Plugin.Template { - public class Plugin : BasePlugin, - IHasWebPages + public class Plugin : BasePlugin, IHasWebPages { - public override string Name => "ExamplePlugin"; + public override string Name => "Template"; public override Guid Id => Guid.Parse("eb5d7894-8eef-4b36-aa6f-5d124e828ce1"); public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer) { @@ -27,9 +26,9 @@ namespace Jellyfin.Plugin.ExamplePlugin new PluginPageInfo { Name = this.Name, - EmbeddedResourcePath = string.Format("Jellyfin.Plugin.{0}.Configuration.configPage.html",this.Name) + EmbeddedResourcePath = string.Format("Jellyfin.Plugin.{0}.Configuration.configPage.html", this.Name) } }; } } -} \ No newline at end of file +} diff --git a/example-plugin/example-jellyfin-plugin.csproj b/example-plugin/example-jellyfin-plugin.csproj index 75156a9..3deeace 100644 --- a/example-plugin/example-jellyfin-plugin.csproj +++ b/example-plugin/example-jellyfin-plugin.csproj @@ -2,7 +2,7 @@ netstandard2.0 - Jellyfin.Plugin.ExamplePlugin + Jellyfin.Plugin.Template From b4e85a019680f35d0d5f6b6df49c3cda64131902 Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 10 Mar 2019 08:55:35 +0900 Subject: [PATCH 2/5] fix indentation and move load and submit out of plugin object --- example-plugin/Configuration/configPage.html | 138 +++++++++---------- 1 file changed, 66 insertions(+), 72 deletions(-) diff --git a/example-plugin/Configuration/configPage.html b/example-plugin/Configuration/configPage.html index aaeaedb..45b4813 100644 --- a/example-plugin/Configuration/configPage.html +++ b/example-plugin/Configuration/configPage.html @@ -1,81 +1,75 @@ - + - ExamplePlugin Configuration + Template -
-
-
-
-
- - -
-
- - -
Numbers go here
-
-
- -
-
- - -
Words go here
-
-
- -
-
-
+
+
+
+
+
+ + +
+
+ + +
Numbers go here
+
+
+ +
+
+ + +
Words go here
+
+
+ +
+
-
+ +
From a9166247a67610d93cf9ed3b42769ba4d83d043c Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 10 Mar 2019 08:56:10 +0900 Subject: [PATCH 3/5] rename csproj file to match plugin namespace --- ...ple-jellyfin-plugin.csproj => Jellyfin.Plugin.Template.csproj} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename example-plugin/{example-jellyfin-plugin.csproj => Jellyfin.Plugin.Template.csproj} (100%) diff --git a/example-plugin/example-jellyfin-plugin.csproj b/example-plugin/Jellyfin.Plugin.Template.csproj similarity index 100% rename from example-plugin/example-jellyfin-plugin.csproj rename to example-plugin/Jellyfin.Plugin.Template.csproj From 125d0021976198685a005307cc6bdec53985abdc Mon Sep 17 00:00:00 2001 From: dkanada Date: Sun, 10 Mar 2019 08:59:36 +0900 Subject: [PATCH 4/5] change some variable names --- example-plugin/Configuration/configPage.html | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/example-plugin/Configuration/configPage.html b/example-plugin/Configuration/configPage.html index 45b4813..e6166b1 100644 --- a/example-plugin/Configuration/configPage.html +++ b/example-plugin/Configuration/configPage.html @@ -5,12 +5,12 @@ Template -
+
-
+
- + -
Numbers go here
+
A Description
-
Words go here
+
Another Description