[grilo-plugins] local-metadata: adapt to the new GrlKeyID type



commit 95ced93e881f51b2b6845d03dde16c720ed39cfa
Author: Guillaume Emont <guijemont igalia com>
Date:   Wed May 4 13:19:00 2011 +0200

    local-metadata: adapt to the new GrlKeyID type

 src/metadata/local-metadata/grl-local-metadata.c |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/metadata/local-metadata/grl-local-metadata.c b/src/metadata/local-metadata/grl-local-metadata.c
index b356f25..d374bc8 100644
--- a/src/metadata/local-metadata/grl-local-metadata.c
+++ b/src/metadata/local-metadata/grl-local-metadata.c
@@ -614,24 +614,25 @@ has_compatible_media_url (GrlMedia *media)
 static resolution_flags_t
 get_resolution_flags (GList *keys)
 {
-  GList *key = keys;
+  GList *iter = keys;
   resolution_flags_t flags = 0;
 
-  while (key != NULL) {
-    if (key->data == GRL_METADATA_KEY_TITLE)
+  while (iter != NULL) {
+    GrlKeyID key = GRLPOINTER_TO_KEYID (iter->data);
+    if (key == GRL_METADATA_KEY_TITLE)
       flags |= FLAG_VIDEO_TITLE;
-    else if (key->data == GRL_METADATA_KEY_SHOW)
+    else if (key == GRL_METADATA_KEY_SHOW)
       flags |= FLAG_VIDEO_SHOWNAME;
-    else if (key->data == GRL_METADATA_KEY_DATE)
+    else if (key == GRL_METADATA_KEY_DATE)
       flags |= FLAG_VIDEO_DATE;
-    else if (key->data == GRL_METADATA_KEY_SEASON)
+    else if (key == GRL_METADATA_KEY_SEASON)
       flags |= FLAG_VIDEO_SEASON;
-    else if (key->data == GRL_METADATA_KEY_EPISODE)
+    else if (key == GRL_METADATA_KEY_EPISODE)
       flags |= FLAG_VIDEO_EPISODE;
-    else if (key->data == GRL_METADATA_KEY_THUMBNAIL)
+    else if (key == GRL_METADATA_KEY_THUMBNAIL)
       flags |= FLAG_THUMBNAIL;
 
-    key = key->next;
+    iter = iter->next;
   }
 
   return flags;



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