[grilo-plugins] all: Use grl_data_has_key() function



commit eecacd8916abac04e1995eb3352de1aeba28d75f
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Wed Mar 30 08:20:23 2011 +0000

    all: Use grl_data_has_key() function
    
    grl_data_key_is_known() has been deprecated.
    
    Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>

 src/media/jamendo/grl-jamendo.c                    |    4 ++--
 src/media/tracker/grl-tracker-media-api.c          |    6 +++---
 src/media/tracker/grl-tracker-metadata.c           |    2 +-
 src/media/tracker/grl-tracker-utils.c              |    2 +-
 src/metadata/gravatar/grl-gravatar.c               |    2 +-
 src/metadata/lastfm-albumart/grl-lastfm-albumart.c |    4 ++--
 src/metadata/local-metadata/grl-local-metadata.c   |   14 +++++++-------
 src/metadata/metadata-store/grl-metadata-store.c   |    2 +-
 8 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/src/media/jamendo/grl-jamendo.c b/src/media/jamendo/grl-jamendo.c
index f6ba5c6..a85eb25 100644
--- a/src/media/jamendo/grl-jamendo.c
+++ b/src/media/jamendo/grl-jamendo.c
@@ -974,8 +974,8 @@ grl_jamendo_source_metadata (GrlMediaSource *source,
   GRL_DEBUG ("grl_jamendo_source_metadata");
 
   if (!ms->media ||
-      !grl_data_key_is_known (GRL_DATA (ms->media),
-                              GRL_METADATA_KEY_ID)) {
+      !grl_data_has_key (GRL_DATA (ms->media),
+                         GRL_METADATA_KEY_ID)) {
     /* Get info from root */
     if (!ms->media) {
       ms->media = grl_media_box_new ();
diff --git a/src/media/tracker/grl-tracker-media-api.c b/src/media/tracker/grl-tracker-media-api.c
index cb455f3..e64ee6c 100644
--- a/src/media/tracker/grl-tracker-media-api.c
+++ b/src/media/tracker/grl-tracker-media-api.c
@@ -224,7 +224,7 @@ fill_grilo_media_from_sparql (GrlTrackerMedia    *source,
     return;
   }
 
-  if (grl_data_key_is_known (GRL_DATA (media), assoc->grl_key)) {
+  if (grl_data_has_key (GRL_DATA (media), assoc->grl_key)) {
     GRL_ODEBUG ("\t\tDropping, already here");
     return;
   }
@@ -748,8 +748,8 @@ grl_tracker_media_browse_category (GrlMediaSource *source,
   GRL_IDEBUG ("%s: id=%u", __FUNCTION__, bs->browse_id);
 
   if (bs->container == NULL ||
-      !grl_data_key_is_known (GRL_DATA (bs->container),
-                              grl_metadata_key_tracker_category)) {
+      !grl_data_has_key (GRL_DATA (bs->container),
+                         grl_metadata_key_tracker_category)) {
     /* Hardcoded categories */
     media = grl_media_box_new ();
     grl_media_set_title (media, "Documents");
diff --git a/src/media/tracker/grl-tracker-metadata.c b/src/media/tracker/grl-tracker-metadata.c
index f765419..6d255a9 100644
--- a/src/media/tracker/grl-tracker-metadata.c
+++ b/src/media/tracker/grl-tracker-metadata.c
@@ -209,7 +209,7 @@ fill_grilo_media_from_sparql (GrlMedia            *media,
     return;
   }
 
-  if (grl_data_key_is_known (GRL_DATA (media), assoc->grl_key)) {
+  if (grl_data_has_key (GRL_DATA (media), assoc->grl_key)) {
     GRL_ODEBUG ("\t\tDropping, already here");
     return;
   }
diff --git a/src/media/tracker/grl-tracker-utils.c b/src/media/tracker/grl-tracker-utils.c
index de10452..632fa28 100644
--- a/src/media/tracker/grl-tracker-utils.c
+++ b/src/media/tracker/grl-tracker-utils.c
@@ -403,7 +403,7 @@ grl_tracker_tracker_get_insert_string (GrlMedia *media, const GList *keys)
     while (assoc_list != NULL) {
       assoc = (tracker_grl_sparql_t *) assoc_list->data;
       if (assoc != NULL) {
-        if (grl_data_key_is_known (GRL_DATA (media), key->data)) {
+        if (grl_data_has_key (GRL_DATA (media), key->data)) {
           if (first) {
             gen_prop_insert_string (gstr, assoc, GRL_DATA (media));
             first = FALSE;
diff --git a/src/metadata/gravatar/grl-gravatar.c b/src/metadata/gravatar/grl-gravatar.c
index e9ca7b0..85586c9 100644
--- a/src/metadata/gravatar/grl-gravatar.c
+++ b/src/metadata/gravatar/grl-gravatar.c
@@ -226,7 +226,7 @@ get_avatar (const gchar *field) {
 static gboolean
 has_dependency (GrlMedia *media, GrlKeyID dependency, GList **missing_keys)
 {
-  if (media && grl_data_key_is_known (GRL_DATA (media), dependency))
+  if (media && grl_data_has_key (GRL_DATA (media), dependency))
     return TRUE;
 
   if (missing_keys)
diff --git a/src/metadata/lastfm-albumart/grl-lastfm-albumart.c b/src/metadata/lastfm-albumart/grl-lastfm-albumart.c
index cbb6f77..4eafb81 100644
--- a/src/metadata/lastfm-albumart/grl-lastfm-albumart.c
+++ b/src/metadata/lastfm-albumart/grl-lastfm-albumart.c
@@ -298,9 +298,9 @@ grl_lastfm_albumart_source_may_resolve (GrlMetadataSource *source,
     return FALSE;
 
   if (media) {
-    if (grl_data_key_is_known (GRL_DATA (media), GRL_METADATA_KEY_ARTIST))
+    if (grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_ARTIST))
       have_artist = TRUE;
-    if (grl_data_key_is_known (GRL_DATA (media), GRL_METADATA_KEY_ALBUM))
+    if (grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_ALBUM))
       have_album = TRUE;
   }
 
diff --git a/src/metadata/local-metadata/grl-local-metadata.c b/src/metadata/local-metadata/grl-local-metadata.c
index 9bba09f..60cfb2b 100644
--- a/src/metadata/local-metadata/grl-local-metadata.c
+++ b/src/metadata/local-metadata/grl-local-metadata.c
@@ -484,15 +484,15 @@ resolve_video (GrlMetadataSourceResolveSpec *rs, resolution_flags_t flags)
                  FLAG_VIDEO_EPISODE)))
     return;
 
-  miss_flags |= grl_data_key_is_known (data, GRL_METADATA_KEY_TITLE) ?
+  miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_TITLE) ?
     0 : FLAG_VIDEO_TITLE;
-  miss_flags |= grl_data_key_is_known (data, GRL_METADATA_KEY_SHOW) ?
+  miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_SHOW) ?
     0 : FLAG_VIDEO_SHOWNAME;
-  miss_flags |= grl_data_key_is_known (data, GRL_METADATA_KEY_DATE) ?
+  miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_DATE) ?
     0 : FLAG_VIDEO_DATE;
-  miss_flags |= grl_data_key_is_known (data, GRL_METADATA_KEY_SEASON) ?
+  miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_SEASON) ?
     0 : FLAG_VIDEO_SEASON;
-  miss_flags |= grl_data_key_is_known (data, GRL_METADATA_KEY_EPISODE) ?
+  miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_EPISODE) ?
     0 : FLAG_VIDEO_EPISODE;
 
   fill_flags = flags & miss_flags;
@@ -645,8 +645,8 @@ grl_local_metadata_source_may_resolve (GrlMetadataSource *source,
   GrlLocalMetadataSourcePriv *priv =
     GRL_LOCAL_METADATA_SOURCE_GET_PRIVATE (source);
 
-  if (media && grl_data_key_is_known (GRL_DATA (media),
-                                      GRL_METADATA_KEY_URL)) {
+  if (media && grl_data_has_key (GRL_DATA (media),
+                                 GRL_METADATA_KEY_URL)) {
     if (GRL_IS_MEDIA_IMAGE (media)) {
       if (has_compatible_media_url (media) &&
           (key_id == GRL_METADATA_KEY_THUMBNAIL))
diff --git a/src/metadata/metadata-store/grl-metadata-store.c b/src/metadata/metadata-store/grl-metadata-store.c
index 2abd801..344cbbc 100644
--- a/src/metadata/metadata-store/grl-metadata-store.c
+++ b/src/metadata/metadata-store/grl-metadata-store.c
@@ -569,7 +569,7 @@ grl_metadata_store_source_may_resolve (GrlMetadataSource *source,
       /* the keys we handle for now only make sense for audio and video */
       return FALSE;
 
-    if (grl_data_key_is_known (GRL_DATA (media), GRL_METADATA_KEY_ID))
+    if (grl_data_has_key (GRL_DATA (media), GRL_METADATA_KEY_ID))
       return TRUE;
   }
 



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