diff options
author | Larry Sachs <larry.j.sachs@intel.com> | 2015-06-09 13:38:07 -0700 |
---|---|---|
committer | Larry Sachs <larry.j.sachs@intel.com> | 2015-06-09 13:38:07 -0700 |
commit | 9e14cd9daf56a83825d80f07fe6326e4beb15889 (patch) | |
tree | 4935580b3351fe40b4e37d80b94d614ccc209edd | |
parent | 629a2fb4b19bc8e6b4091d29e14fee1b5a8f741d (diff) | |
parent | b5394e2be1cfaefe1f442a7cacc1c3a1f0c1c1ff (diff) | |
download | dleyna-server-9e14cd9daf56a83825d80f07fe6326e4beb15889.tar.gz |
Merge branch 'master' of https://github.com/01org/dleyna-server
-rwxr-xr-x | libdleyna/server/props.c | 31 | ||||
-rw-r--r-- | libdleyna/server/server.c | 4 |
2 files changed, 35 insertions, 0 deletions
diff --git a/libdleyna/server/props.c b/libdleyna/server/props.c index eea50ea..ee42f72 100755 --- a/libdleyna/server/props.c +++ b/libdleyna/server/props.c @@ -1505,6 +1505,23 @@ void dls_props_add_container(GVariantBuilder *item_vb, prv_add_resources(item_vb, GUPNP_DIDL_LITE_OBJECT(object), filter_mask, FALSE); + + if (filter_mask & DLS_UPNP_MASK_PROP_ARTIST) { + GUPnPDIDLLiteObject *obj = GUPNP_DIDL_LITE_OBJECT(object); + const char *artist = gupnp_didl_lite_object_get_artist(obj); + prv_add_string_prop (item_vb, + DLS_INTERFACE_PROP_ARTIST, + artist); + } + + if (filter_mask & DLS_UPNP_MASK_PROP_ALBUM_ART_URL) { + GUPnPDIDLLiteObject *obj = GUPNP_DIDL_LITE_OBJECT(object); + const char *url = gupnp_didl_lite_object_get_album_art(obj); + prv_add_string_prop (item_vb, + DLS_INTERFACE_PROP_ALBUM_ART_URL, + url); + } + res = prv_get_matching_resource(GUPNP_DIDL_LITE_OBJECT(object), protocol_info); if (res) { @@ -2039,6 +2056,20 @@ GVariant *dls_props_get_container_prop(const gchar *prop, DLEYNA_LOG_DEBUG("Prop %s = %u", prop, uint_val); retval = g_variant_ref_sink(g_variant_new_uint32(uint_val)); + } else if (!strcmp(prop, DLS_INTERFACE_PROP_ARTIST)) { + const char *strval = gupnp_didl_lite_object_get_artist( + GUPNP_DIDL_LITE_OBJECT(object)); + + DLEYNA_LOG_DEBUG("Prop %s = %u", prop, uint_val); + + retval = g_variant_ref_sink(g_variant_new_string(strval)); + } else if (!strcmp(prop, DLS_INTERFACE_PROP_ALBUM_ART_URL)) { + const char *strval = gupnp_didl_lite_object_get_album_art( + GUPNP_DIDL_LITE_OBJECT(object)); + + DLEYNA_LOG_DEBUG("Prop %s = %u", prop, uint_val); + + retval = g_variant_ref_sink(g_variant_new_string(strval)); } else if (!strcmp(prop, DLS_INTERFACE_PROP_RESOURCES)) { retval = g_variant_ref_sink( prv_compute_resources(object, DLS_UPNP_MASK_ALL_PROPS, diff --git a/libdleyna/server/server.c b/libdleyna/server/server.c index 425f764..ec725de 100644 --- a/libdleyna/server/server.c +++ b/libdleyna/server/server.c @@ -341,6 +341,10 @@ static const gchar g_server_introspection[] = " access='read'/>" " <property type='x' name='"DLS_INTERFACE_PROP_SIZE"'" " access='read'/>" + " <property type='s' name='"DLS_INTERFACE_PROP_ARTIST"'" + " access='read'/>" + " <property type='s' name='"DLS_INTERFACE_PROP_ALBUM_ART_URL"'" + " access='read'/>" " </interface>" " <interface name='"DLS_INTERFACE_MEDIA_ITEM"'>" " <method name='"DLS_INTERFACE_GET_COMPATIBLE_RESOURCE"'>" |