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.
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?
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
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?