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
Registering a new Aspect from a Plugin failing
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="McGoober" data-source="post: 935537" data-attributes="member: 24098"><p>See, now I'm a bit torn between having a callback to perform registration in or adding registration items into the plugin.xml...</p><p> </p><p>Do we do...</p><p>[CODE]</p><p>public class MediaServerPlugin : IPluginStateTracker</p><p>{</p><p> public void SystemRunning()</p><p> {</p><p> ServiceRegistration.Get<IMediaItemAspectTypeRegistration>()</p><p> .RegisterLocallyKnownMediaItemAspectType(DlnaAspect.Metadata);</p><p> }</p><p>}</p><p>[/CODE]</p><p> </p><p>or....</p><p>[CODE]</p><p><Register Location="/Database/Aspects"></p><p> <Instance</p><p> Id="DlnaAspect"</p><p> ClassName="MediaPortal.Extensions.MediaServer.Aspects.DlnaAspect"/></p><p></Register></p><p>[/CODE]</p><p> </p><p>My concern is that all registrations for my plugin must happen before the UPNP subsystem is brought up. I haven't as yet drilled down to the call that happens in but according to the log it's after the database subsystem is active. If I was to register everything in the plugin.xml then it's up to the core team to decide when registration of the different parts actually occurs, and not me. This would mean that if a core init change were to happen I would (should) be decoupled from the changes.</p><p>Make sense?</p></blockquote><p></p>
[QUOTE="McGoober, post: 935537, member: 24098"] See, now I'm a bit torn between having a callback to perform registration in or adding registration items into the plugin.xml... Do we do... [CODE] public class MediaServerPlugin : IPluginStateTracker { public void SystemRunning() { ServiceRegistration.Get<IMediaItemAspectTypeRegistration>() .RegisterLocallyKnownMediaItemAspectType(DlnaAspect.Metadata); } } [/CODE] or.... [CODE] <Register Location="/Database/Aspects"> <Instance Id="DlnaAspect" ClassName="MediaPortal.Extensions.MediaServer.Aspects.DlnaAspect"/> </Register> [/CODE] My concern is that all registrations for my plugin must happen before the UPNP subsystem is brought up. I haven't as yet drilled down to the call that happens in but according to the log it's after the database subsystem is active. If I was to register everything in the plugin.xml then it's up to the core team to decide when registration of the different parts actually occurs, and not me. This would mean that if a core init change were to happen I would (should) be decoupled from the changes. Make sense? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Registering a new Aspect from a Plugin failing
Contact us
RSS
Top
Bottom