[grilo] [test-ui] Show all available metadata keys



commit f7c347492782d61a54ddd798db882fdc067fad9b
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Mon Jun 7 19:53:10 2010 +0200

    [test-ui] Show all available metadata keys

 tools/grilo-test-ui/main.c |   26 +++++++++-----------------
 1 files changed, 9 insertions(+), 17 deletions(-)
---
diff --git a/tools/grilo-test-ui/main.c b/tools/grilo-test-ui/main.c
index 148cce9..e021eb1 100644
--- a/tools/grilo-test-ui/main.c
+++ b/tools/grilo-test-ui/main.c
@@ -253,23 +253,15 @@ browse_keys (void)
 static GList *
 metadata_keys (void)
 {
-  return grl_metadata_key_list_new (GRL_METADATA_KEY_ID,
-                                    GRL_METADATA_KEY_TITLE,
-                                    GRL_METADATA_KEY_URL,
-                                    GRL_METADATA_KEY_ARTIST,
-                                    GRL_METADATA_KEY_ALBUM,
-                                    GRL_METADATA_KEY_GENRE,
-                                    GRL_METADATA_KEY_THUMBNAIL,
-                                    GRL_METADATA_KEY_SITE,
-                                    GRL_METADATA_KEY_AUTHOR,
-                                    GRL_METADATA_KEY_LYRICS,
-                                    GRL_METADATA_KEY_DATE,
-                                    GRL_METADATA_KEY_DESCRIPTION,
-                                    GRL_METADATA_KEY_MIME,
-                                    GRL_METADATA_KEY_DURATION,
-                                    GRL_METADATA_KEY_RATING,
-                                    GRL_METADATA_KEY_CHILDCOUNT,
-                                    NULL);
+  GrlPluginRegistry *registry;
+  static GList *keys = NULL;
+
+  if (!keys) {
+    registry = grl_plugin_registry_get_instance ();
+    keys = grl_plugin_registry_get_metadata_keys (registry);
+  }
+
+  return keys;
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]