Skip to content

Skin Designers Guide

Damien Haynes edited this page May 3, 2014 · 8 revisions

The purpose of this document is to help you understand how Trailers interacts with the MediaPortal's skin engine. In this document you're going to find a general overview of how the plug-in is structured, the components that you, as a skinner should be interested in, and a list of available properties that you can use.

If you want to see whats NEW in a particular version, search for the version throughout this page e.g. To see what has changed in v1.0.1, perform a search on term 1.0.1.

Translations

You can make use any of the plugins string translations to create button menus, headings, labels etc. Syntax for translations are just simple skin properties in the form #Trailers.Translation.$(string).Label e.g.

Property English
#Trailers.Translation.Trailers.Label Trailers
#Trailers.Translation.Trailer.Label Trailer
#Trailers.Translation.Settings.Label Settings

There is a wide selection of translated strings to choose from, here is a complete list. Use the Field value in the skin property to get the translation you require.

Trailers Button

The Trailers plugin allows the skinner to add a trailers button to various media plugins such as MovingPictures Details View, My Films Details, My Videos VideoInfo, MP-TVSeries (Show, Season and Episode views) and all Trakt Movie, Show, Season and Episode windows. When the user clicks on the button, the trailers plugin will search for trailers from various providers including local and online trailers (depending on user settings).

Some plugins have multiple views per window e.g. MovingPictures and ShowTimes have a main movie list and a details view. If you want trailers supported in both views with the same button id then you need to ensure that the same button is used in both views i.e. only a single button defined in the skin otherwise you can take advantage of the secondary trailer buttons (11900-11901) to aid in proper navigation when you have more than one control with the same id but conditionally visible. Most skinners would probably take advantage of the extra buttons because they have different skin layouts per view so will need to add the trailer button in different places dependent if you're in the main facade list or a details view.

Control Type Control ID Description
Button 11899 Trailers Button
Button 11900 Trailers Button (v1.0.5)
Button 11901 Trailers Button (v1.1.0)

Note: You can use the Trailers translations to add a label to the button.

Example

<control>
  <description>Trailers</description>
  <type>button</type>
  <id>11899</id>
  <label>#Trailers.Translation.Trailers.Label...</label>
  <onup>51</onup>
  <ondown>51</ondown>
  <onright>51</onright>
  <onleft>51</onleft>
  <posX>20</posX>
  <posY>642</posY>
  <visible>plugin.isenabled(Trailers)</visible>
</control>

Trailers Menu

In Trailers (v1.1.5) a new dialog menu was introduced, if the skin implements this dialog then the trailers for selection are loaded into this dialog otherwise it will fallback to the standard dialog menu.

Currently the custom Trailers dialog is basically the same as the standard menu i.e. same controls inherited from dialog menu. Skinners can simply use DialogMenu.xml as a base to work with. As a skinner you may want to make the list wider or place in a different position etc.

| Dialog ID | Dialog Skin File :-----------|:------------|:------------| 11898|Trailers.Selection.Menu.xml|

Control Type Control ID Description
Button 2 Exit Button
ListControl 3 List control for Trailers selection
Label 4 Menu Heading
Label 5 Dialog Heading

Settings

The settings for Trailers can be configured from MediaPortal Configuration -> Plugins section, alternatively most of the settings can also be configured from with-in the GUI (accept for for advanced features such as adding directories and updating search patterns).

You can either access GUI settings via the MPEI Extensions plugin by selecting 'Trailers' and then clicking on the 'Settings' button, alternatively a skinner can create a button anywhere in their skin which directly links to this window:

Example

<control>
  <description>MPEICONFIGURE:b4293f64_9e83_4f1f_b2e3_8bdea2a37425</description>
  <type>button</type>
  <id>9999</id>
  <label>#Trailers.Translation.Settings.Label</label>
  <ondown>2</ondown>
  <visible>string.equals(#mpei.b4293f64_9e83_4f1f_b2e3_8bdea2a37425.isinstalled, true)</visible>
</control>

Note: The GUID 'b4293f64_9e83_4f1f_b2e3_8bdea2a37425' refers to a unique ID of the plugin.

Clone this wiki locally