MediaTypeManager

class xdm.plugins.bases.MediaTypeManager(instance)

These plugins define what XDM manages e.g. Movies, Books etc. They also define how each type looks.

Plugins of this type define a “MediaType” e.g. Movies They define a Structure of Classes simple classes that resemble Objects needed for the media that is being reflected.

addConfig = {}

Add configuration to otherplugins

keys
a plugin base class reference
value
list of dicts [{‘type’:’category’, ‘default’: None, ‘prefix’: ‘Category for’, ‘sufix’: ‘Movies’}] TODO: explain more
defaultElements = []

list of dicts Elements to create

e.g.
{‘tgdb’:{‘name’: ‘Nintendo Wii’, ‘alias’:’Wii’, ‘id’: 9}}

Note

each list item is a dict that can contain multiple provider informations for one Element. In the above example we create the Wii with given attributes for the provider that has the tag tgdb (thegamesdb.net)

download = None

The class to download/search for

elementConfigsFor = ()

Tuple of classes that will have a configuration on each plugin e.g. Platform of de.lad1337.games TODO: link Platform

getConfigHtml()

The return value of this function is simply injected in the config panel

default is a html comment: <!– nothing here –> you can use this to add dynamic javascript and/or add additional html

Note

The container this is added in is hidden with inline css. to make use of the html use javascript

identifier = ''

A absolute unique identifier in reverse URL style e.g. de.lad1337.nzb

order = ()

A tubple that defines the order top to bottom / outer to inner of the classes that reflect the media

search(search_query)

Search the ONE provider for search_query the provider is either the first one or the provider that is set as the “searcher”