- Add LessonsController with GET /Plugins/Lessons/List endpoint - Add LessonStore DI registration in ServiceRegistrator - Add lessonsPage.html embedded resource with grouped lesson listing - Implement IHasWebPages in Plugin for sidebar nav entry - Add ImplicitUsings/Nullable to csproj for net9.0 compatibility - Add Microsoft.AspNetCore.App FrameworkReference for MVC - Fix ServiceRegistrator to match 10.10.x IPluginServiceRegistrator signature
39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MediaBrowser.Common.Configuration;
|
|
using MediaBrowser.Common.Plugins;
|
|
using MediaBrowser.Model.Plugins;
|
|
using MediaBrowser.Model.Serialization;
|
|
using Jellyfin.Plugin.Lessons.Configuration;
|
|
|
|
namespace Jellyfin.Plugin.Lessons;
|
|
|
|
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
|
|
{
|
|
public Plugin(IApplicationPaths appPaths, IXmlSerializer xmlSerializer)
|
|
: base(appPaths, xmlSerializer)
|
|
{
|
|
}
|
|
|
|
public override string Name => "Lessons";
|
|
|
|
public override Guid Id => Guid.Parse("a1b2c3d4-e5f6-7890-abcd-ef1234567890");
|
|
|
|
public override string Description => "Homeschool lesson plans with embedded media";
|
|
|
|
public IEnumerable<PluginPageInfo> GetPages()
|
|
{
|
|
return new[]
|
|
{
|
|
new PluginPageInfo
|
|
{
|
|
Name = Name,
|
|
DisplayName = "Lessons",
|
|
EmbeddedResourcePath = GetType().Namespace + ".Configuration.lessonsPage.html",
|
|
EnableInMainMenu = true,
|
|
MenuSection = "plugins",
|
|
MenuIcon = "book"
|
|
}
|
|
};
|
|
}
|
|
}
|