GNOME Bugzilla – Bug 739499
Separate property registration from source activation
Last modified: 2014-12-02 15:02:36 UTC
"Source" properties that could be used in multiple plugins but only get registered in certain plugins. For example, the tmdb-imdb-id property is registered by the "The Movie DB" plugin, but could get used in other plugins, which could be registered before that particular plugin. We can probably work-around that for now by adding a: grl_media_set_service_id (GrlMedia *media, const char *site, const char *id); so we could do: grl_media_set_service_id (media, "imdb", "ttXXXXX"); grl_media_set_service_id (media, "tvdb", "XXXX");
With the current code we have now, one solution could be listening for the "metadata-key-added" signal to know when the key is registered. That is, the source in question can check if the key is in the registry; if so, then the source can be registered and used in a normal way. If not, it could not register itself and listen the "metadata-key-added". As soon as the interested key is registered, the source can register itself to be used. Of course, this is can be done at this moment. But I agree that having some activation ordering in the plugins would be useful too.
I was thinking more of an another entry point, and doing the property registration before any of the plugins are init'ed. Something that would be launched before plugin_init() is called.
Implemented in bug 740943. *** This bug has been marked as a duplicate of bug 740943 ***