Its constructor can accept any number of injected dependencies - depending on what your plugin needs to access. See Automatic Type Discovery for this and other types you can include in your plug-in. This is done by creating a class that implements the IServerEntryPoint interface. To add real functionality to your plugin, you will need an entrypoint that can initialize and accept the various dependencies you may need in order to interact with the MB environment. At this point you should see your plugin in the Dashboard's Plugins menu. Shutdown the server, rebuild your solution, and restart the server. Xcopy "$(TargetPath)" "%AppData%\Emby-Server\Plugins\" /y Test the Plugin Create a post-build event that will copy the assembly to the server's plugins directory. Important - If migrating an existing plugin solution from Visual Studio 2015, then the plugin Id value should come from the AssemblyGuid located in AssemblyInfo.cs of your 2015 project. This will be the Id for the plugin and can never be changed. In Plugin.cs, override the Id property, and return the guid you just created. Create a random GUID using visual studio's Create Guid tool under the Tools menu.Public Plugin(IApplicationPaths applicationPaths, IXmlSerializer xmlSerializer) : base(applicationPaths, xmlSerializer) You will need to implement its constructor like so: The Roku bif plugin is a good example.Ĭreate a class called PluginConfiguration, and have it inherit from .Ĭreate a class called Plugin, and have it inherit from, where T is the name of the PluginConfiguration class you just created. Use Visual Studio to check for any non-beta updates to the Emby nuget package.įor these next steps, you may wish to refer to an example. This will will add a reference to the Emby nuget package.īuild again to ensure Visual Studio has picked up the external changes. csproj file and replace the entire contents with the following: The process of building will save all changes to disk. Create your Visual Studio Solution (VS 2017 )Ĭreate a. The following instructions will show you how to build one plugin that will run on all platforms supported by Emby Server. OverviewĮmby Server runs on two different runtimes. Install Visual Studio 2017 along with the. Please see our Development Policy before beginning development.įirst install Emby Server, and get it up and running.
0 Comments
Leave a Reply. |