[grilo-plugins] upnp: add support for track number property
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] upnp: add support for track number property
- Date: Wed, 14 Sep 2011 11:22:44 +0000 (UTC)
commit 6e417653b51e756761ca444c09f67f21c6b20fa7
Author: Jonathan Matthew <jonathan d14n org>
Date: Mon Sep 12 21:41:31 2011 +1000
upnp: add support for track number property
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=658812
src/media/upnp/grl-upnp.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/media/upnp/grl-upnp.c b/src/media/upnp/grl-upnp.c
index 88048aa..fddfe71 100644
--- a/src/media/upnp/grl-upnp.c
+++ b/src/media/upnp/grl-upnp.c
@@ -550,6 +550,7 @@ setup_key_mappings (void)
g_hash_table_insert (key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_GENRE), "genre");
g_hash_table_insert (key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_URL), "res");
g_hash_table_insert (key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_DATE), "modified");
+ g_hash_table_insert (key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_TRACK_NUMBER), "originalTrackNumber");
g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_TITLE), "title");
g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_URL), "res");
g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_DATE), "dc:date");
@@ -557,6 +558,7 @@ setup_key_mappings (void)
g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_ALBUM), "upnp:album");
g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_GENRE), "upnp:genre");
g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_DURATION), "res duration");
+ g_hash_table_insert (filter_key_mapping, GRLKEYID_TO_POINTER (GRL_METADATA_KEY_TRACK_NUMBER), "upnp:originalTrackNumber");
}
static gchar *
@@ -827,6 +829,8 @@ set_metadata_value (GrlData *data,
}
} else if (key_id == GRL_METADATA_KEY_CHILDCOUNT && value) {
grl_data_set_int (data, GRL_METADATA_KEY_CHILDCOUNT, atoi (value));
+ } else if (key_id == GRL_METADATA_KEY_TRACK_NUMBER && value) {
+ grl_data_set_int (data, GRL_METADATA_KEY_TRACK_NUMBER, atoi (value));
} else {
grl_data_set_string (data, key_id, value);
}
@@ -1072,6 +1076,7 @@ grl_upnp_source_supported_keys (GrlMetadataSource *source)
GRL_METADATA_KEY_GENRE,
GRL_METADATA_KEY_CHILDCOUNT,
GRL_METADATA_KEY_THUMBNAIL,
+ GRL_METADATA_KEY_TRACK_NUMBER,
NULL);
}
return keys;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]