![]() IBlurayExaminer - Allows you to examine blu-ray folders.Likewise you might need to get data and services from the Jellyfin core, Jellyfin provides a number of interfaces you can add as parameters to your plugin constructor which are then made available in your project (you can see the 2 mandatory ones that are needed by the plugin system in the constructor as is). You can use it exactly as you would in a normal Web-API project. This is the default ASP.NET Web-API controller. Be aware that your main plugin class (IBasePlugin) cannot also be a IServerEntryPoint.īaseController - Allows you to define custom REST-API endpoints. You can make as many of these as you need and it is wildly useful for loading configs or persisting state. IServerEntryPoint - Allows you to run code at server startup that will stay in memory. If you used one of the quickstart example projects, a premade page with some useful components to work with has been created for you! If not you can check out this guide here for how to whip one up. IPluginConfigurationPage - Allows you to have a plugin config page on the dashboard. Here's a quick overview on how to use them If your plugin doesn't fit perfectly neatly into a predefined interface, never fear, there are a set of interfaces and classes that allow your plugin to extend Jellyfin any which way you please. Use plugin aimed interfaces to add custom functionality If you're an expert on a particular interface, you should help contribute some documentation! 4b. There are loads of other interfaces that can be used, but you'll need to poke around the API to get some info. IScheduledTask - Allows you to create a scheduled task that will appear in the scheduled task lists on the dashboard.you wanted to have a theme song for each tv series stored in a subfolder that could be accessed by your plugin for playback in a menu). IResolverIgnoreRule - Allows you to define subpaths that are ignored by media resolvers for use with another function (i.e.IMetadataSaver - Allows you to define a metadata standard that Jellyfin can use to write metadata.ILibraryPostScanTask - Allows you to define a task that fires after scanning a library.IItemResolver - Allows you to define custom media types.a trailer before a movie, or a network bumper before an episode of a show) IIntroProvider - Allows you to play a piece of media before another piece of media (i.e.IBaseItemComparer - Allows you to add sorting rules for dealing with media that will show up in sort menus.IAuthenticationProvider - Allows you to add an authentication provider that can authenticate a user based on a name and a password, but that doesn't expect to deal with local users.Here's some interfaces you could implement for common use cases: ![]() ![]() Jellyfin uses some automatic discovery and injection to allow any interfaces you implement in your plugin to be available in Jellyfin. If the functionality you are trying to add is functionality related to something that Jellyfin has an interface for you're in luck. Most people aren't satisfied with just having an entry in a menu for their plugin, most people want to have some functionality, so lets look at how to add it. If you want to try and hook it up to a debugger make sure you copy the generated PDB file alongside it. Place that guid inside the Guid.Parse("") quotes to define your plugin's ID.Ĭongratulations, you now have everything you need for a perfectly functional functionless Jellyfin plugin! You can try it out right now if you'd like by compiling it, then placing the dll you generate in the plugins folder under your Jellyfin config directory.To get started you can use the following section. It needs an override on ID, an override on Name, and a constructor that follows a specific model. The Plugin class needs a few properties implemented before it can work correctly. Note: If you called your PluginConfiguration class something different, you need to put that between the Implement Required Properties It will define your name, version and Id. This class is used to hold settings your plugin might need. You can call it whatever you'd like really. There are a few mandatory classes you'll need for a plugin so we need to make them. You won't be needing this, so go ahead and delete it. You have an autogenerated Class1.cs file.
0 Comments
Leave a Reply. |