thejacer87 9 Posted April 1, 2017 Share Posted April 1, 2017 the docs/wiki seem to be non-existant. can someone help me out with some info. I want to convert this plex plugin to emby, but have no idea where to start. Thanks Link to comment Share on other sites More sharing options...
Luke 37071 Posted April 1, 2017 Share Posted April 1, 2017 https://github.com/MediaBrowser/Emby/wiki/How-to-build-a-Server-Plugin Link to comment Share on other sites More sharing options...
Luke 37071 Posted April 1, 2017 Share Posted April 1, 2017 then you'll probably want to look at one of the existing channel plugins as an example. Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 thanks luke,serious question: how do you get anything done? it seems like everytime i post an issue you reply in 5 minutes Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) then you'll probably want to look at one of the existing channel plugins as an example. any chance you know of a well made one that would be good to emulate? vimeo was the 1st one i found https://github.com/MediaBrowser/Emby.Channels/tree/master/MediaBrowser.Plugins.Vimeo Edited April 1, 2017 by thejacer87 Link to comment Share on other sites More sharing options...
Luke 37071 Posted April 1, 2017 Share Posted April 1, 2017 that should be fine. Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 https://github.com/MediaBrowser/Emby/wiki/How-to-build-a-Server-Plugin Damn... visual studio eh... does emby have an irc or discord for devs? I can ask around to see if any develops in Linux and see what their setup is. Link to comment Share on other sites More sharing options...
Luke 37071 Posted April 1, 2017 Share Posted April 1, 2017 The best place for discussion is right here in the Emby Community where others can participate and search information. Visual Studio Community is free now by the way. Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) The best place for discussion is right here in the Emby Community where others can participate and search information. Visual Studio Community is free now by the way. on linux? i know visual studio code is free, but that doesnt seem to be the same thing. i assume the plugins need to be compiled in visual studio. so the only option i have i think is mono develop, which i had trouble getting configured properly, but was able to contribute to Radarr. So ya, if anyone could help me get it setup in mono that'd be great. edit: the wiki also says to download emby server core in the PM Console... is that something different than the my actual server? would i be able to just test the plugin on my working server? Edited April 1, 2017 by thejacer87 Link to comment Share on other sites More sharing options...
Luke 37071 Posted April 1, 2017 Share Posted April 1, 2017 Correct you can use your working installed server. Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 k well, if anyone can chime in with a linux dev environment lemme know. i will look into it tonight/tomorrow Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) ok so i seem to have been able to get it started... i was able to do most of the steps in the wiki. I was able to create the PCL, install the nuget package, and created the plugin classes. I am able to build it with no errors.However, I can't see how to generate the guid in Assembly.cs. Also it doesn't look like md has post build events. So I will just have to copy them over myself manually. 2 problems: I don't know what/which file(s) were made in the build process. And I don't know where to copy it to. My emby server is on a different computer than my dev environment. Shouldn't be an issue, but I still don't know where to put it. - also, i am running emby-server on debian. so i dunno if that changes the location of the plugins Edited April 1, 2017 by thejacer87 Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 Correct you can use your working installed server. so it looks like the only thing on the server for the plugins are .dll files. thejacer87:/var/lib/emby-server/plugins$ ls AutoBoxSets.dll configurations Emby.Kodi.SyncQueue.dll MBBackup.dll but when i build the project in md, I can't see any dll files generated. Any ideas? 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted April 1, 2017 Share Posted April 1, 2017 (edited) You need to put the plugin dll in the folder called "plugins" It is in the server root. I dunno where that is on Linux. There are two classes that are important when making plugins. The "plugin" class And The "PluginConfiguration" class Do you have those files generated in your dll? Edited April 1, 2017 by chef Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 (edited) You need to put the plugin dll in the folder called "plugins" It is in the server root. I dunno where that is on Linux. There are two classes that are important when making plugins. The "plugin" class And The "PluginConfiguration" class Do you have those files generated in your dll? that was the problem, i didn't know where the dll is. I've literally never made a c# project b4. I went into every folder in the project and finally found the dll in bin folder. i've moved it to /var/lib/emby-server/plugins, which is where the other 2 dll of the plugins i have installed. should that be where i put my plugin? i do have both of those classes made like the wiki says. I just tried restarting the server with my plugin and didn't see anything in the plugins section of the server Edited April 1, 2017 by thejacer87 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted April 1, 2017 Share Posted April 1, 2017 (edited) The dll will build itself in "bin/debug/{pluginName}.dll Yes! Place your plugin dll in that folder Remember that you should increase the version number of your plugin each time you build it, otherwise the server will not load the newest version. Easiest way to do this is to find the file called "AssembyInfo" in your Solution Explorer. Change the line: [assembly: AssemblyVersion("1.0.0.0")] To: [assembly: AssemblyVersion("1.0.*)] This will auto update the version number. Are you using Visual Studio? Edited April 1, 2017 by chef Link to comment Share on other sites More sharing options...
chef 3746 Posted April 1, 2017 Share Posted April 1, 2017 Here check this out. It is a sample plugin Solution which might help you. https://www.dropbox.com/s/7qm73mivnc7h6c1/SampleProjectPlugin.zip?dl=0 Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 Are you using Visual Studio? no, as i mentioned in an earlier post, i'm using linux, therefore monodevelop (md) IDE. it seems like it should build everything ok, i was able build/develop a different project a month or so ago. md had the option for a PCL project and was able to get nuget project easily. So i think itll work fine for what im doing. i did have the 1.0* like you mentioned in the assembly.cs. but i can't figure out how to generate the guid in md. can i just make that up for now? i think (hope) thats the only issue right now 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted April 1, 2017 Share Posted April 1, 2017 no, as i mentioned in an earlier post, i'm using linux, therefore monodevelop (md) IDE. it seems like it should build everything ok, i was able build/develop a different project a month or so ago. md had the option for a PCL project and was able to get nuget project easily. So i think itll work fine for what im doing. i did have the 1.0* like you mentioned in the assembly.cs. but i can't figure out how to generate the guid in md. can i just make that up for now? i think (hope) thats the only issue right now Yes, the GUID is important for when you add web page configuration to your project. It is used to update the plugin configuration. Good luck! I'm interested in how you get along! Building plugins in Mono sounds cool! Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 1, 2017 Author Share Posted April 1, 2017 Yes, the GUID is important for when you add web page configuration to your project. It is used to update the plugin configuration. Good luck! I'm interested in how you get along! Building plugins in Mono sounds cool! k so for the guid, can i just make it up though? or does VS do something fancy behind the scenes with it? Link to comment Share on other sites More sharing options...
chef 3746 Posted April 2, 2017 Share Posted April 2, 2017 (edited) k so for the guid, can i just make it up though? or does VS do something fancy behind the scenes with it? Yes, I believe you can create your own. As long as the GUID from your assembly matches the one In your JavaScript config HTML page it should work okay. Edited April 2, 2017 by chef 1 Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 2, 2017 Author Share Posted April 2, 2017 awesome thanks... ill be working on it tonight. so expect some more questions!!! 1 Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 2, 2017 Author Share Posted April 2, 2017 hey! it worked! now to start programming! 1 Link to comment Share on other sites More sharing options...
chef 3746 Posted April 2, 2017 Share Posted April 2, 2017 hey! it worked! now to start programming! Well done! Link to comment Share on other sites More sharing options...
thejacer87 9 Posted April 3, 2017 Author Share Posted April 3, 2017 so i'm just trying to get the plugin setup with a config page. i put the plugin on github: https://github.com/thejacer87/Emby_LazyMan if anyone wants to take a look. i am just trying to copy the iptv plugin. i feel like i've got everything lined up right, but the plugin configuration page doesn't load. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now