1. Summary
  2. Files
  3. Support
  4. Report Spam
  5. Create account
  6. Log in

Plugins

From pms-mlx

Jump to: navigation, search

The functionality of the ps3 media server can be extended in many ways with plugins. This page is intended for plugin developers and describes, what kind of plugins can be created, where they will show up in pms, what they will do and how they can be created.
Please refer to the code for detailes about the methods. The examples contain pms-mlx source code in pms_no_libs.jar

Contents

Requirements for plugins to work

Description file for class implementing a plugin interface

For a plugin to be recogized by pms, it has to contain a class implementing one of the interfaces from the next chapters.
Additionally, a text file called 'plugin' containing the package + class name of the class implementing the plugin interface has to be contained at the root of your jar.
File:example_jar_plugin_file.png

Package name

In order to ease configuration of loggers, it is recommended to put it in the package net.pms.plugin.<plugintype>

Original pms plugin system

Everything related to orginal pms plugins lives in the package net.pms.external.
All plugins inherit from the common ExternalListener interface.

The plugins will show up in the 'General Configuration' tab in the 'Plugins' category.
File:original_pms_plugins.png

ExternalListener

This is the base interface for all other original plugins. All developed plugins will have to implement the method specified in this interface.

AdditionalFolder(s)AtRoot

Both interfaces offer methods to either add a single folder or multiple folders to the root when browsing folders on the renderer. It is being discouraged to develop plugins with these interfaces explicitly for pms-mlx, as DlnaTreeFolderPlugin offers better integration.

AdditionalResourceFolderListener

This plugin is only supported by the original pms, but not pms-mlx!

FinalizeTranscoderArgsListener

Lets change configuration parameters before the transcoding of a file starts

StartStopListener

Is being notified each time a file starts or stops playing
Example: PlayCountWatcherPlugin

pms-mlx plugin system

Everything related to pms-mlx plugins lives in the package net.pms.medialibrary.external.

DlnaTreeFolderPlugin

These are folders that can be added to the tree. They show up underneath the separator when adding a folder
File:context_menu_expanded.png
Each instance can have its own configuration that you can manage.
plugintype=dlnatreefolder
Example: FileSystemPlugin

FileDetailPlugin

Lets add files or folders when displaying a file as a folder.
plugintype=filedetail
Example: TmdbRater

FileImportPlugin

These can be created to import file information from anywhere. pms-mlx stores several attributes for files; some aren't modifiable by plugins (like the frame rate, audio codecs etc.), but others, like the name, rating etc. can. Besides those defined values, any other property can be added through tags. A tag is associated with a list of values. The only limitation with tags, is that they are all being handled as strings.
A plugin can be configured for video, audio and/or pictures. It must specify the fields it can provide and can also have a list of tags.
When querying a plugin, both the cleaned file name as well as the absolute file path are being passed as parameters. This way an importer could e.g. import metadata from mkv files, data from an nfo or from a web page.
File:file_import_panel.png

plugintype=fileimport
Exemple: TmdbMovieImportPlugin

Building plugins

The examples all contain a ANT script called build.xml at the root of the project. To build the jar, run the build ANT task. The build.xml file will have to be modified when releasing your plugin.

Personal tools