[grilo-plugins] tmdb: Use new register_keys vfunc
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] tmdb: Use new register_keys vfunc
- Date: Tue, 27 Jan 2015 17:34:06 +0000 (UTC)
commit 14ddadf4e01f26b2c930acfd044bdcd612285850
Author: Bastien Nocera <hadess hadess net>
Date: Tue Dec 2 12:18:21 2014 +0100
tmdb: Use new register_keys vfunc
https://bugzilla.gnome.org/show_bug.cgi?id=740943
src/tmdb/grl-tmdb.c | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
---
diff --git a/src/tmdb/grl-tmdb.c b/src/tmdb/grl-tmdb.c
index b443eac..28829c4 100644
--- a/src/tmdb/grl-tmdb.c
+++ b/src/tmdb/grl-tmdb.c
@@ -153,6 +153,19 @@ grl_tmdb_source_plugin_init (GrlRegistry *registry,
return FALSE;
}
+ GrlTmdbSource *source = grl_tmdb_source_new (api_key);
+ grl_registry_register_source (registry,
+ plugin,
+ GRL_SOURCE (source),
+ NULL);
+ g_free (api_key);
+ return TRUE;
+}
+
+static void
+grl_tmdb_source_plugin_register_keys (GrlRegistry *registry,
+ GrlPlugin *plugin)
+{
GRL_TMDB_METADATA_KEY_BACKDROP =
register_metadata_key (registry,
"tmdb-backdrop",
@@ -176,19 +189,12 @@ grl_tmdb_source_plugin_init (GrlRegistry *registry,
"tmdb-id",
"tmdb-id",
"ID of this movie at tmdb.org");
-
- GrlTmdbSource *source = grl_tmdb_source_new (api_key);
- grl_registry_register_source (registry,
- plugin,
- GRL_SOURCE (source),
- NULL);
- g_free (api_key);
- return TRUE;
}
-GRL_PLUGIN_REGISTER (grl_tmdb_source_plugin_init,
- NULL,
- PLUGIN_ID);
+GRL_PLUGIN_REGISTER_FULL (grl_tmdb_source_plugin_init,
+ NULL,
+ grl_tmdb_source_plugin_register_keys,
+ PLUGIN_ID);
/* ================== GrlTmdbMetadata GObject ================ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]