[PATCH 02/11] local-metadata: updated to new date format
- From: Guillaume Emont <guijemont igalia com>
- To: grilo-list gnome org
- Cc: Guillaume Emont <guijemont igalia com>
- Subject: [PATCH 02/11] local-metadata: updated to new date format
- Date: Wed, 22 Jun 2011 19:13:47 +0200
---
src/metadata/local-metadata/grl-local-metadata.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/src/metadata/local-metadata/grl-local-metadata.c b/src/metadata/local-metadata/grl-local-metadata.c
index d374bc8..e4cc3c6 100644
--- a/src/metadata/local-metadata/grl-local-metadata.c
+++ b/src/metadata/local-metadata/grl-local-metadata.c
@@ -500,7 +500,7 @@ resolve_video (GrlMetadataSource *source,
0 : FLAG_VIDEO_TITLE;
miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_SHOW) ?
0 : FLAG_VIDEO_SHOWNAME;
- miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_DATE) ?
+ miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_PUBLICATION_DATE) ?
0 : FLAG_VIDEO_DATE;
miss_flags |= grl_data_has_key (data, GRL_METADATA_KEY_SEASON) ?
0 : FLAG_VIDEO_SEASON;
@@ -538,9 +538,7 @@ resolve_video (GrlMetadataSource *source,
if (date) {
if (fill_flags & FLAG_VIDEO_DATE) {
- gchar *str_date = g_date_time_format (date, "%F");
- grl_data_set_string (data, GRL_METADATA_KEY_DATE, str_date);
- g_free (str_date);
+ grl_data_set_boxed (data, GRL_METADATA_KEY_PUBLICATION_DATE, date);
}
g_date_time_unref (date);
}
@@ -623,7 +621,7 @@ get_resolution_flags (GList *keys)
flags |= FLAG_VIDEO_TITLE;
else if (key == GRL_METADATA_KEY_SHOW)
flags |= FLAG_VIDEO_SHOWNAME;
- else if (key == GRL_METADATA_KEY_DATE)
+ else if (key == GRL_METADATA_KEY_PUBLICATION_DATE)
flags |= FLAG_VIDEO_DATE;
else if (key == GRL_METADATA_KEY_SEASON)
flags |= FLAG_VIDEO_SEASON;
@@ -648,7 +646,7 @@ grl_local_metadata_source_supported_keys (GrlMetadataSource *source)
keys = grl_metadata_key_list_new (GRL_METADATA_KEY_THUMBNAIL,
GRL_METADATA_KEY_TITLE,
GRL_METADATA_KEY_SHOW,
- GRL_METADATA_KEY_DATE,
+ GRL_METADATA_KEY_PUBLICATION_DATE,
GRL_METADATA_KEY_SEASON,
GRL_METADATA_KEY_EPISODE,
NULL);
@@ -677,7 +675,7 @@ grl_local_metadata_source_may_resolve (GrlMetadataSource *source,
if (priv->guess_video &&
(key_id == GRL_METADATA_KEY_TITLE ||
key_id == GRL_METADATA_KEY_SHOW ||
- key_id == GRL_METADATA_KEY_DATE ||
+ key_id == GRL_METADATA_KEY_PUBLICATION_DATE ||
key_id == GRL_METADATA_KEY_SEASON ||
key_id == GRL_METADATA_KEY_EPISODE))
return TRUE;
--
1.7.4.1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]