[grilo-plugins] upnp: Fix date key
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] upnp: Fix date key
- Date: Thu, 17 Mar 2011 11:12:46 +0000 (UTC)
commit c8b740c11a3f4b6d4245986c0dc6be60ae53d580
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Mar 17 10:29:00 2011 +0000
upnp: Fix date key
Use "dc:date" as UPnP key to get date.
On behalf of Michael Wood.
Signed-off-by: Juan A. Suarez Romero <jasuarez igalia com>
src/media/upnp/grl-upnp.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/media/upnp/grl-upnp.c b/src/media/upnp/grl-upnp.c
index f024b53..424e900 100644
--- a/src/media/upnp/grl-upnp.c
+++ b/src/media/upnp/grl-upnp.c
@@ -551,12 +551,11 @@ setup_key_mappings (void)
g_hash_table_insert (key_mapping, GRL_METADATA_KEY_DATE, "modified");
g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_TITLE, "title");
g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_URL, "res");
- g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_DATE, "modified");
+ g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_DATE, "dc:date");
g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_ARTIST, "upnp:artist");
g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_ALBUM, "upnp:album");
g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_GENRE, "upnp:genre");
g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_DURATION, "res duration");
- g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_DATE, "modified");
}
static gchar *
@@ -795,6 +794,8 @@ get_value_for_key (GrlKeyID key_id,
(const xmlChar *) "duration");
} else if (key_id == GRL_METADATA_KEY_URL && props) {
val = (gchar *) xmlNodeGetContent ((xmlNode *) props->data);
+ } else if (key_id == GRL_METADATA_KEY_DATE && props) {
+ val = g_strdup (gupnp_didl_lite_object_get_date (didl));
} else if (key_id == GRL_METADATA_KEY_THUMBNAIL && props) {
val = g_strdup (gupnp_didl_lite_object_get_album_art (didl));
if (!val)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]