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
Questions on writing my first plugin
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="huha" data-source="post: 892750" data-attributes="member: 63847"><p>I couldn't wait to try befor the flight, but was running into an issue. While it works fine for your example, i am getting an error message with my plugin.</p><p> </p><p>I have included in the TvwishList plugin.xml</p><p> </p><p>[spoiler]<Builder Name="TvWishListMP2TvExtensionBuilder" ClassName="MediaPortal.Plugins.SlimTvClient.Interfaces.Extensions.SlimTvExtensionBuilder"/></p><p><Register Location="/SlimTv/Extensions"></p><p><TvWishListMP2TvExtensionBuilder Id="{eb81047e-f3c5-4fae-8000-a67e306dfd8c}" Caption="TestCreateTvWish" ClassName="MediaPortal.Plugins.TvWishListMP2.ExtensionButtons.SlimTvCreateTvWish"/></p><p></Register>[/spoiler]</p><p> </p><p>and created my own class</p><p> </p><p>[spoiler]using MediaPortal.Plugins.SlimTvClient.Interfaces.Extensions;</p><p>using MediaPortal.Plugins.SlimTvClient.Interfaces.Items;</p><p>using MediaPortal.Common;</p><p>using MediaPortal.Common.Logging;</p><p> </p><p>namespace MediaPortal.Plugins.TvWishListMP2.ExtensionButtons</p><p>{</p><p>/// <summary></p><p>/// Example class for definition of <see cref="IProgramAction"/>s.</p><p>/// </summary></p><p>class SlimTvCreateTvWish: IProgramAction</p><p>{</p><p>ILogger Log = ServiceRegistration.Get<ILogger>();</p><p>public bool DoSomethingWithProgram(IProgram program)</p><p>{</p><p>Log.Debug("SlimTv Button Create TvWish was pressed");</p><p>return true;</p><p>}</p><p> </p><p>public bool IsAvailable (IProgram program)</p><p>{</p><p>return true;</p><p>}</p><p> </p><p>public ProgramActionDelegate ProgramAction</p><p>{</p><p>get { return DoSomethingWithProgram; }</p><p>}</p><p>}</p><p>}[/spoiler]</p><p> </p><p> </p><p>it only creates an error in the log file</p><p> </p><p>[spoiler][2012-08-20 13:34:00,613] [23242 ] [InputMgr ] [DEBUG] - WorkflowManager: Entering model context with workflow state '7323beb9-f7b0-48c8-80ff-8b59a4db5385' (old state was 'c7646667-5e63-48c7-a490-a58ac9518cfa') in new workflow model '5054408d-c2a9-451f-a702-e84afcd29c10'</p><p>[2012-08-20 13:34:00,623] [23252 ] [InputMgr ] [ERROR] - PluginManager: Error building plugin item '{eb81047e-f3c5-4fae-8000-a67e306dfd8c}' at location '/SlimTv/Extensions'</p><p>MediaPortal.Common.PluginManager.Exceptions.PluginInternalException: Builder class 'MediaPortal.Plugins.SlimTvClient.Interfaces.Extensions.SlimTvExtensionBuilder' could not be instantiated</p><p>bei MediaPortal.Common.Services.PluginManager.PluginManager.GetOrCreateBuilder(String builderName)</p><p>bei MediaPortal.Common.Services.PluginManager.PluginManager.RequestItem(PluginItemRegistration itemRegistration, Type type, IPluginItemStateTracker stateTracker)</p><p>[2012-08-20 13:34:00,626] [23255 ] [InputMgr ] [WARN ] - Could not instantiate SlimTv extension with id '{eb81047e-f3c5-4fae-8000-a67e306dfd8c}'</p><p>[2012-08-20 13:34:00,788] [23417 ] [InputMgr ] [DEBUG] - WorkflowManager: Compiling menu actions for workflow state 'SlimTvClientMultiChannelGuide'</p><p>[2012-08-20 13:34:00,789] [23418 ] [InputMgr ] [DEBUG] - WorkflowManager: Tidying up...</p><p>[2012-08-20 13:34:00,790] [23419 ] [InputMgr ] [INFO ] - WorkflowManager: Trying to show screen 'SlimTvClient-fullguide'...[/spoiler]</p><p> </p><p> </p><p>The full log is attached. Any idea what i am doing wrong here?</p><p> </p><p>I also tried to change in plugin.xml <Register Location="/SlimTv/Extensions"> to <Register Location="/TvWishListMP2/Extensions">, which let the error disappear, but did not show the button either.</p></blockquote><p></p>
[QUOTE="huha, post: 892750, member: 63847"] I couldn't wait to try befor the flight, but was running into an issue. While it works fine for your example, i am getting an error message with my plugin. I have included in the TvwishList plugin.xml [spoiler]<Builder Name="TvWishListMP2TvExtensionBuilder" ClassName="MediaPortal.Plugins.SlimTvClient.Interfaces.Extensions.SlimTvExtensionBuilder"/> <Register Location="/SlimTv/Extensions"> <TvWishListMP2TvExtensionBuilder Id="{eb81047e-f3c5-4fae-8000-a67e306dfd8c}" Caption="TestCreateTvWish" ClassName="MediaPortal.Plugins.TvWishListMP2.ExtensionButtons.SlimTvCreateTvWish"/> </Register>[/spoiler] and created my own class [spoiler]using MediaPortal.Plugins.SlimTvClient.Interfaces.Extensions; using MediaPortal.Plugins.SlimTvClient.Interfaces.Items; using MediaPortal.Common; using MediaPortal.Common.Logging; namespace MediaPortal.Plugins.TvWishListMP2.ExtensionButtons { /// <summary> /// Example class for definition of <see cref="IProgramAction"/>s. /// </summary> class SlimTvCreateTvWish: IProgramAction { ILogger Log = ServiceRegistration.Get<ILogger>(); public bool DoSomethingWithProgram(IProgram program) { Log.Debug("SlimTv Button Create TvWish was pressed"); return true; } public bool IsAvailable (IProgram program) { return true; } public ProgramActionDelegate ProgramAction { get { return DoSomethingWithProgram; } } } }[/spoiler] it only creates an error in the log file [spoiler][2012-08-20 13:34:00,613] [23242 ] [InputMgr ] [DEBUG] - WorkflowManager: Entering model context with workflow state '7323beb9-f7b0-48c8-80ff-8b59a4db5385' (old state was 'c7646667-5e63-48c7-a490-a58ac9518cfa') in new workflow model '5054408d-c2a9-451f-a702-e84afcd29c10' [2012-08-20 13:34:00,623] [23252 ] [InputMgr ] [ERROR] - PluginManager: Error building plugin item '{eb81047e-f3c5-4fae-8000-a67e306dfd8c}' at location '/SlimTv/Extensions' MediaPortal.Common.PluginManager.Exceptions.PluginInternalException: Builder class 'MediaPortal.Plugins.SlimTvClient.Interfaces.Extensions.SlimTvExtensionBuilder' could not be instantiated bei MediaPortal.Common.Services.PluginManager.PluginManager.GetOrCreateBuilder(String builderName) bei MediaPortal.Common.Services.PluginManager.PluginManager.RequestItem(PluginItemRegistration itemRegistration, Type type, IPluginItemStateTracker stateTracker) [2012-08-20 13:34:00,626] [23255 ] [InputMgr ] [WARN ] - Could not instantiate SlimTv extension with id '{eb81047e-f3c5-4fae-8000-a67e306dfd8c}' [2012-08-20 13:34:00,788] [23417 ] [InputMgr ] [DEBUG] - WorkflowManager: Compiling menu actions for workflow state 'SlimTvClientMultiChannelGuide' [2012-08-20 13:34:00,789] [23418 ] [InputMgr ] [DEBUG] - WorkflowManager: Tidying up... [2012-08-20 13:34:00,790] [23419 ] [InputMgr ] [INFO ] - WorkflowManager: Trying to show screen 'SlimTvClient-fullguide'...[/spoiler] The full log is attached. Any idea what i am doing wrong here? I also tried to change in plugin.xml <Register Location="/SlimTv/Extensions"> to <Register Location="/TvWishListMP2/Extensions">, which let the error disappear, but did not show the button either. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Questions on writing my first plugin
Contact us
RSS
Top
Bottom