After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 739499 - Separate property registration from source activation
Separate property registration from source activation
Status: RESOLVED DUPLICATE of bug 740943
Product: grilo
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-11-01 15:18 UTC by Bastien Nocera
Modified: 2014-12-02 15:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Bastien Nocera 2014-11-01 15:18:47 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");
Comment 1 Juan A. Suarez Romero 2014-11-01 16:55:13 UTC
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.
Comment 2 Bastien Nocera 2014-11-01 18:34:41 UTC
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.
Comment 3 Bastien Nocera 2014-12-02 15:02:36 UTC
Implemented in bug 740943.

*** This bug has been marked as a duplicate of bug 740943 ***