jellyfin-smart-playlist/Jellyfin.Plugin.SmartPlaylist/Plugin.cs

36 lines
1.4 KiB
C#
Raw Normal View History

2024-06-27 01:47:44 +02:00
using System.Globalization;
using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Plugins;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Serialization;
2024-12-21 01:09:41 +01:00
using MediaBrowser.Controller;
using MediaBrowser.Controller.Library;
2024-06-27 01:47:44 +02:00
namespace Jellyfin.Plugin.SmartPlaylist {
public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages {
2024-12-21 01:09:41 +01:00
public IServerApplicationPaths ServerApplicationPaths;
public IUserManager UserManager;
2024-06-27 01:47:44 +02:00
public Plugin(
IApplicationPaths applicationPaths,
2024-12-21 01:09:41 +01:00
IXmlSerializer xmlSerializer,
IServerApplicationPaths serverApplicationPaths,
IUserManager userManager
2024-06-27 01:47:44 +02:00
) : base (applicationPaths, xmlSerializer) {
Instance = this;
2024-12-21 01:09:41 +01:00
ServerApplicationPaths = serverApplicationPaths;
UserManager = userManager;
2024-06-27 01:47:44 +02:00
}
public static Plugin? Instance {get; private set; }
public override string Name => "Smart Playlist";
public override Guid Id => Guid.Parse("dd2326e3-4d3e-4bfc-80e6-28502c1131df");
public IEnumerable<PluginPageInfo> GetPages() {
return new[] {
new PluginPageInfo {
Name = this.Name,
EmbeddedResourcePath = string.Format(CultureInfo.InvariantCulture, "{0}.configPage.html", GetType().Namespace)
}
};
}
}
}