![plex media server plugins folde plex media server plugins folde](https://cdn.bestdroidplayer.com/wp-content/uploads/2017/10/plugin-folder.png)
PYTHONPATH=C:\PlexInstall\python27.zip C:\PlexInstall\Exts Set working directory to C:\PlexInstall.Next to main module browse to the bootstrap.properties in the previously created folder.
![plex media server plugins folde plex media server plugins folde](https://www.howtogeek.com/wp-content/uploads/2018/03/app-store-featured.png)
Right click the project, select Run As –> Run configurations….Type in C:\PlexData\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python.Click Advanced, Link to alternate location.To make the launch config easier to manage it best to link in the location of bootstrap.py, so right click on your plugin project and select C:\PlexData\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Platforms\Windows\i386\Libraries.C:\PlexData\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python.C:\PlexData\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Platforms\Shared\Libraries.I had configured as my interpreter Python 2.7 for win32, with the following PYTHONPATH (configured from windows->Preferences->Interpreters->Python): So take it from me, don’t waste your time trying to use PlexScriptHost. There’s a bug in PyDev where if you have a launch configuration that uses a different interpreter to what the project is configured with, it will revert back to the project’s interpreter when you change certain settings but stay the same other times. I wasted a fair amount of time discovering that I didn’t have it working (as far as I can tell). "%PLEXHOME%\PlexScriptHost.exe" "%PLEXLOCALAPPDATA%\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python/bootstrap.py" "-log-file=%CURDIR%\logs\plugin.log" "%CURDIR%" %*ĭuring the process of writing this up I discovered that when I had thought that I had it working using PlexScriptHost in PyDev, it was using regular Python. Set PYTHONPATH=%PLEXHOME%\python27.zip %PLEXHOME%\Exts Here is the contents of my C:\Development\MyPlugin.bundle\run-plugin.cmd It allows you to test that it compiles using the bootstrap but none of the http wiring and plugin data needs to be configured so it won’t serve requests. “C:\Users\\AppData\Local\Plex Media Server” to “C:\PlexData\Plex Media Server”. To make the paths shorter, I moved the local application data using the Web settings –> General (Advanced Settings) from It was was part reverse engineering, part trail and error. I did however get some launch scripts working, both from the command prompt and within PyDev. I went down some dead-ends on that and eventually discovered that PyDev doesn’t seem to use the python-c process it kicks off in order to look up the global variables. I was trying to add the globals that are exposed to the plugin at runtime to the same modules so that the framework PyDev uses to pick them up. I spent a bit of time trying to get PyDev to compile using some hackery but the way I was trying to do it I hit too many hurdles. There also didn’t seem to be a SDK or toolset for developing the plugins, which upon looking at the plugin bootstrap procedure I can understand why – a lot of the classes are dynamically generated and together with some other imports, are set as global variables on the plugin’s executed _init_.py My next post I’ll give dumps of the runtime API and the differences in the object model – which aren’t too much of a big deal unless your doing audio only plugins (I’m getting a streaming radio station channel working). However in trying to tweak a plugin I wanted to get working, I’ve discovered that the API that forms the latest Plex Media Server doesn’t match up with the API Reference provided. Plex Media Server has a nicely extensible API for writing plugins which are classified into channels, agents and services.