uPnP plugin - date
- From: Michael Wood <michael g wood linux intel com>
- To: grilo-list gnome org
- Subject: uPnP plugin - date
- Date: Wed, 16 Mar 2011 13:03:18 +0000
Hey,
Im trying to get the date to display for more media items from upnp
sources, and noticed that you can sort by dc:date for items, so by adding:
diff --git a/src/media/upnp/grl-upnp.c b/src/media/upnp/grl-upnp.c
index f024b53..67258cd 100644
--- a/src/media/upnp/grl-upnp.c
+++ b/src/media/upnp/grl-upnp.c
@@ -557,6 +557,7 @@ setup_key_mappings (void)
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");
+ g_hash_table_insert (filter_key_mapping, GRL_METADATA_KEY_DATE,
"dc:date");
}
static gchar *
@@ -795,6 +796,9 @@ 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)
We should be able to get a date if available.
However what I'm not sure on is if g_hash_table_insert
(filter_key_mapping, GRL_METADATA_KEY_DATE, "modified");
Actually does anything, as I'm not aware of a "modified" tag in upnp.
Michael
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]