Merge pull request #9 from jellyfin/js-error
Fix runtime error and add a few comments
This commit is contained in:
commit
a437fa140b
@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
});
|
||||
});
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user