summaryrefslogtreecommitdiffstats
path: root/binding/media-api.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-01-04 11:59:26 -0800
committerMatt Ranostay <matt.ranostay@konsulko.com>2018-01-04 13:35:41 -0800
commit4a2b9a16d6fc2459fa0ab3daa8cf7064e4616a81 (patch)
tree1f37a321f6bf30c51269647a18f72d685c375e1d /binding/media-api.c
parent33850f0e8b2e87675d29f84850123465ec931036 (diff)
binding: mediaplayer: tag media type in playlist
Some clients may not want or need both audio and video media in the the returned playlist. This change tags the media type in each playlist entries JSON output. Bug-AGL: SPEC-1236 Change-Id: I78a25b92f64eb73cca24f5f6a857913567c25f2c Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/media-api.c')
-rw-r--r--binding/media-api.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/binding/media-api.c b/binding/media-api.c
index 892f67d..065b258 100644
--- a/binding/media-api.c
+++ b/binding/media-api.c
@@ -88,6 +88,9 @@ static json_object *new_json_object_from_device(GList *list)
jstring = json_object_new_string(item->path);
json_object_object_add(jdict, "path", jstring);
+ jstring = json_object_new_string(lms_scan_types[item->type]);
+ json_object_object_add(jdict, "type", jstring);
+
if (item->metadata.title) {
jstring = json_object_new_string(item->metadata.title);
json_object_object_add(jdict, "title", jstring);