[plugins 1/1] all: Use grl_data_has_key() function
- From: "Juan A. Suarez Romero" <jasuarez igalia com>
- To: grilo-list gnome org
- Subject: [plugins 1/1] all: Use grl_data_has_key() function
- Date: Wed, 30 Mar 2011 11:17:16 +0200
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/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 +-
7 files changed, 17 insertions(+), 17 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 0e11f69..782a42c 100644
--- a/src/media/tracker/grl-tracker-media-api.c
+++ b/src/media/tracker/grl-tracker-media-api.c
@@ -216,7 +216,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;
}
@@ -661,8 +661,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 22aba1a..228b4a4 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/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;
}
--
1.7.4
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]