[grilo-plugins] vimeo: Add iso8601 formatting for date metadata
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] vimeo: Add iso8601 formatting for date metadata
- Date: Thu, 3 Mar 2011 19:43:12 +0000 (UTC)
commit 0a096e65cae6a5eb2e5ca22197c5d3f8e11d580f
Author: Michael Wood <michael g wood linux intel com>
Date: Thu Mar 3 19:05:10 2011 +0000
vimeo: Add iso8601 formatting for date metadata
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=643811
src/vimeo/grl-vimeo.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/src/vimeo/grl-vimeo.c b/src/vimeo/grl-vimeo.c
index a235217..0d5a397 100644
--- a/src/vimeo/grl-vimeo.c
+++ b/src/vimeo/grl-vimeo.c
@@ -197,6 +197,20 @@ str_to_gint (gchar *str)
return 0;
}
+static gchar *
+str_to_iso8601 (gchar *str)
+{
+ gchar **date;
+ gchar *iso8601_date;
+
+ date = g_strsplit (str, " ", -1);
+ iso8601_date = g_strdup_printf ("%sT%sZ", date[0], date[1]);
+ g_strfreev (date);
+
+ return iso8601_date;
+}
+
+
static void
update_media (GrlMedia *media, GHashTable *video)
{
@@ -235,7 +249,7 @@ update_media (GrlMedia *media, GHashTable *video)
str = g_hash_table_lookup (video, VIMEO_VIDEO_UPLOAD_DATE);
if (str)
{
- grl_media_set_date (media, str);
+ grl_media_set_date (media, str_to_iso8601(str));
}
str = g_hash_table_lookup (video, VIMEO_VIDEO_THUMBNAIL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]