home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
AtmoLight 2.1.0.0 for MediaPortal2 [2015-01-21]
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="morpheus_xx" data-source="post: 1079065" data-attributes="member: 48495"><p>Maybe take a look at the VideoPlayer plugin for easier examples. In principle you can either:</p><ol> <li data-xf-list-type="ol">Use inbuilt base classes for simple selection (yes/no, text, number, list selection, ...)</li> <li data-xf-list-type="ol">Provide an own model+screen to create more complex configuration screens</li> </ol><p>You define configuration sections using the plugin.xml file: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/plugin.xml#L37-L43" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/plugin.xml#L37-L43</a>. There are sections (ConfigSection) and settings (ConfigSetting).</p><p></p><p>1) A simple "yes / no" selection you can find here:</p><p><a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/plugin.xml#L141-L147" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/plugin.xml#L141-L147</a>. It refers to the classname </p><p>MediaPortal.UI.Players.Video.Settings.Configuration.AudioPreferMultiChannel, which is defined here: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/settings/Configuration/AudioPreferMultiChannel.cs#L29-L43" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/settings/Configuration/AudioPreferMultiChannel.cs#L29-L43</a>.</p><p></p><p>2) A more detailed configuration is used in other plugins like Trakt.tv:</p><ul> <li data-xf-list-type="ul">It registers own model for configuration: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L57-L66" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L57-L66</a></li> <li data-xf-list-type="ul">It has a dummy class: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/Settings/Configuration/TraktSettingConfiguration.cs" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/Settings/Configuration/TraktSettingConfiguration.cs</a></li> <li data-xf-list-type="ul">The registration contains a so called WorkflowState with ID "3DB8C6DB-F4E4-4A87-80CE-53339AECF494". This one is defined in plugin workflow definitions:<a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L28-L31" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L28-L31</a></li> <li data-xf-list-type="ul">The defined workflow state is a DialogState, which uses a screen and a model (<a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L20-L22" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L20-L22</a>)<br /> </li> <li data-xf-list-type="ul">And an own screen for configuration: <a href="https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/Skin/default/screens/dialogTraktSetup.xaml" target="_blank">https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/Skin/default/screens/dialogTraktSetup.xaml</a></li> </ul><p>We need to put the descriptions more detailed into wiki... Does anyone of our [USERGROUP=54]@DocumentationGroup[/USERGROUP] would like to help with this part?</p></blockquote><p></p>
[QUOTE="morpheus_xx, post: 1079065, member: 48495"] Maybe take a look at the VideoPlayer plugin for easier examples. In principle you can either: [LIST=1] [*]Use inbuilt base classes for simple selection (yes/no, text, number, list selection, ...) [*]Provide an own model+screen to create more complex configuration screens [/LIST] You define configuration sections using the plugin.xml file: [url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/plugin.xml#L37-L43[/url]. There are sections (ConfigSection) and settings (ConfigSetting). 1) A simple "yes / no" selection you can find here: [url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/plugin.xml#L141-L147[/url]. It refers to the classname MediaPortal.UI.Players.Video.Settings.Configuration.AudioPreferMultiChannel, which is defined here: [url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Source/UI/Players/VideoPlayer/settings/Configuration/AudioPreferMultiChannel.cs#L29-L43[/url]. 2) A more detailed configuration is used in other plugins like Trakt.tv: [LIST] [*]It registers own model for configuration: [url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L57-L66[/url] [*]It has a dummy class: [url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/Settings/Configuration/TraktSettingConfiguration.cs[/url] [*]The registration contains a so called WorkflowState with ID "3DB8C6DB-F4E4-4A87-80CE-53339AECF494". This one is defined in plugin workflow definitions:[url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L28-L31[/url] [*]The defined workflow state is a DialogState, which uses a screen and a model ([url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/plugin.xml#L20-L22[/url]) [*]And an own screen for configuration: [url]https://github.com/MediaPortal/MediaPortal-2/blob/master/MediaPortal/Incubator/Trakt/Skin/default/screens/dialogTraktSetup.xaml[/url] [/LIST] We need to put the descriptions more detailed into wiki... Does anyone of our [USERGROUP=54]@DocumentationGroup[/USERGROUP] would like to help with this part? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
AtmoLight 2.1.0.0 for MediaPortal2 [2015-01-21]
Contact us
RSS
Top
Bottom