[grilo-plugins] test: Adapt test to new key definition



commit 33c1963fc6865adfd767dcdc676a7cb906b0dfd5
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Tue May 17 07:32:27 2011 +0000

    test: Adapt test to new key definition
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 test/main.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/test/main.c b/test/main.c
index afe28e1..39d1622 100644
--- a/test/main.c
+++ b/test/main.c
@@ -69,16 +69,18 @@ print_supported_ops (GrlMetadataSource *source)
 static void
 print_metadata (gpointer key, GrlData *content)
 {
-  if (key == GRL_METADATA_KEY_DESCRIPTION) {
+  GrlKeyID keyid = GRLPOINTER_TO_KEYID (key);
+
+  if (keyid == GRL_METADATA_KEY_DESCRIPTION) {
     return;
   }
 
-  const GValue *value = grl_data_get (content, key);
+  const GValue *value = grl_data_get (content, keyid);
   if (value && G_VALUE_HOLDS_STRING (value)) {
-    GRL_DEBUG ("\t%s: %s", GRL_METADATA_KEY_GET_NAME (key),
+    GRL_DEBUG ("\t%s: %s", GRL_METADATA_KEY_GET_NAME (keyid),
                g_value_get_string (value));
   } else if (value && G_VALUE_HOLDS_INT (value)) {
-    GRL_DEBUG ("\t%s: %d",  GRL_METADATA_KEY_GET_NAME (key),
+    GRL_DEBUG ("\t%s: %d",  GRL_METADATA_KEY_GET_NAME (keyid),
                g_value_get_int (value));
   }
 }



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