fix runtime error and add a few comments

This commit is contained in:
dkanada 2019-11-27 03:13:09 +09:00
parent cc95400340
commit 788a47edb0
5 changed files with 12 additions and 7 deletions

View File

@ -7,19 +7,22 @@ namespace Jellyfin.Plugin.Template.Configuration
OneOption,
AnotherOption
}
public class PluginConfiguration : BasePluginConfiguration
{
//This is where you should store configurable settings your plugin might need.
// 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 PluginConfiguration()
{
// set default options here
Options = SomeOptions.AnotherOption;
TrueFalseSetting = true;
AnInteger = 5;
AString = "This is a string setting";
AnInteger = 2;
AString = "string";
}
}
}

View File

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8">
<title>Template</title>
</head>
<body>
@ -63,7 +63,7 @@
config.AnInteger = $('#AnInteger').val();
config.TrueFalseSetting = $('#TrueFalseSetting').prop('checked');
config.AString = $('#AString').val();
ApiClient.updatePluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId, config).then(function (result) {
ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) {
Dashboard.processPluginConfigurationUpdateResult(result);
});
});

View File

@ -6,8 +6,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jellyfin.Controller" Version="10.2.0.1" />
<PackageReference Include="Jellyfin.Model" Version="10.2.0.1" />
<PackageReference Include="Jellyfin.Controller" Version="10.*" />
<PackageReference Include="Jellyfin.Model" Version="10.*" />
</ItemGroup>
<ItemGroup>

View File

@ -11,7 +11,9 @@ namespace Jellyfin.Plugin.Template
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
{
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)
{
Instance = this;