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: 934383" data-attributes="member: 24098"><p>Sanity check here... I must be missing something.</p><p> </p><p>Ok, so I have a plugin which needs to register a new aspect so I can store extra data about media items. So I create the new aspect and go to register it. However when I do (I'm doing this from IPluginStateTracker.Activated()) I get an exception in the core.</p><p> </p><p>[CODE]System.NullReferenceException: Object reference not set to an instance of an object.</p><p> at MediaPortal.Backend.Services.MediaLibrary.MediaLibrary.AddMediaItemAspectStorage(MediaItemAspectMetadata miam) in E:\users\jason leonard\work\mediaportal-2\MediaPortal\Source\Core\MediaPortal.Backend\Services\MediaLibrary\MediaLibrary.cs:line 956</p><p> at MediaPortal.Backend.Services.MediaManagement.MediaItemAspectTypeRegistration.RegisterLocallyKnownMediaItemAspectType(MediaItemAspectMetadata miam) in E:\users\jason leonard\work\mediaportal-2\MediaPortal\Source\Core\MediaPortal.Backend\Services\MediaManagement\MediaItemAspectTypeRegistration.cs:line 51</p><p> at MediaPortal.Extensions.MediaServer.MediaServerPlugin.Activated(PluginRuntime pluginRuntime)</p><p> at MediaPortal.Common.Services.PluginManager.PluginManager.TryActivate(PluginRuntime plugin) in E:\users\jason leonard\work\mediaportal-2\MediaPortal\Source\Core\MediaPortal.Common\Services\PluginManager\PluginManager.cs:line 930</p><p>[/CODE]</p><p> </p><p>Apparently the MediaLibrary service hasn't been started yet, and therefore fails to register the aspect.</p><p>So the question is.. when do I get a call from the IPluginStateTracker that I can use to register the aspect?</p></blockquote><p></p>
[QUOTE="McGoober, post: 934383, member: 24098"] Sanity check here... I must be missing something. Ok, so I have a plugin which needs to register a new aspect so I can store extra data about media items. So I create the new aspect and go to register it. However when I do (I'm doing this from IPluginStateTracker.Activated()) I get an exception in the core. [CODE]System.NullReferenceException: Object reference not set to an instance of an object. at MediaPortal.Backend.Services.MediaLibrary.MediaLibrary.AddMediaItemAspectStorage(MediaItemAspectMetadata miam) in E:\users\jason leonard\work\mediaportal-2\MediaPortal\Source\Core\MediaPortal.Backend\Services\MediaLibrary\MediaLibrary.cs:line 956 at MediaPortal.Backend.Services.MediaManagement.MediaItemAspectTypeRegistration.RegisterLocallyKnownMediaItemAspectType(MediaItemAspectMetadata miam) in E:\users\jason leonard\work\mediaportal-2\MediaPortal\Source\Core\MediaPortal.Backend\Services\MediaManagement\MediaItemAspectTypeRegistration.cs:line 51 at MediaPortal.Extensions.MediaServer.MediaServerPlugin.Activated(PluginRuntime pluginRuntime) at MediaPortal.Common.Services.PluginManager.PluginManager.TryActivate(PluginRuntime plugin) in E:\users\jason leonard\work\mediaportal-2\MediaPortal\Source\Core\MediaPortal.Common\Services\PluginManager\PluginManager.cs:line 930 [/CODE] Apparently the MediaLibrary service hasn't been started yet, and therefore fails to register the aspect. So the question is.. when do I get a call from the IPluginStateTracker that I can use to register the aspect? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Registering a new Aspect from a Plugin failing
Contact us
RSS
Top
Bottom