fix runtime error and add a few comments
This commit is contained in:
parent
cc95400340
commit
788a47edb0
@ -7,19 +7,22 @@ namespace Jellyfin.Plugin.Template.Configuration
|
|||||||
OneOption,
|
OneOption,
|
||||||
AnotherOption
|
AnotherOption
|
||||||
}
|
}
|
||||||
|
|
||||||
public class PluginConfiguration : BasePluginConfiguration
|
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 bool TrueFalseSetting { get; set; }
|
||||||
public int AnInteger { get; set; }
|
public int AnInteger { get; set; }
|
||||||
public string AString { get; set; }
|
public string AString { get; set; }
|
||||||
public SomeOptions Options { get; set; }
|
public SomeOptions Options { get; set; }
|
||||||
|
|
||||||
public PluginConfiguration()
|
public PluginConfiguration()
|
||||||
{
|
{
|
||||||
|
// set default options here
|
||||||
Options = SomeOptions.AnotherOption;
|
Options = SomeOptions.AnotherOption;
|
||||||
TrueFalseSetting = true;
|
TrueFalseSetting = true;
|
||||||
AnInteger = 5;
|
AnInteger = 2;
|
||||||
AString = "This is a string setting";
|
AString = "string";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8">
|
||||||
<title>Template</title>
|
<title>Template</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@ -63,7 +63,7 @@
|
|||||||
config.AnInteger = $('#AnInteger').val();
|
config.AnInteger = $('#AnInteger').val();
|
||||||
config.TrueFalseSetting = $('#TrueFalseSetting').prop('checked');
|
config.TrueFalseSetting = $('#TrueFalseSetting').prop('checked');
|
||||||
config.AString = $('#AString').val();
|
config.AString = $('#AString').val();
|
||||||
ApiClient.updatePluginConfiguration(ExamplePluginConfigurationPage.pluginUniqueId, config).then(function (result) {
|
ApiClient.updatePluginConfiguration(TemplateConfig.pluginUniqueId, config).then(function (result) {
|
||||||
Dashboard.processPluginConfigurationUpdateResult(result);
|
Dashboard.processPluginConfigurationUpdateResult(result);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Jellyfin.Controller" Version="10.2.0.1" />
|
<PackageReference Include="Jellyfin.Controller" Version="10.*" />
|
||||||
<PackageReference Include="Jellyfin.Model" Version="10.2.0.1" />
|
<PackageReference Include="Jellyfin.Model" Version="10.*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
@ -11,7 +11,9 @@ namespace Jellyfin.Plugin.Template
|
|||||||
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
||||||
{
|
{
|
||||||
public override string Name => "Template";
|
public override string Name => "Template";
|
||||||
|
|
||||||
public override Guid Id => Guid.Parse("eb5d7894-8eef-4b36-aa6f-5d124e828ce1");
|
public override Guid Id => Guid.Parse("eb5d7894-8eef-4b36-aa6f-5d124e828ce1");
|
||||||
|
|
||||||
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer)
|
public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer)
|
||||||
{
|
{
|
||||||
Instance = this;
|
Instance = this;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user