summaryrefslogtreecommitdiffstats
path: root/binding/media-manager.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2018-01-04 11:59:26 -0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2018-01-11 14:27:57 +0000
commit46340988885a128d03930b233ae792bb559f3392 (patch)
treeba7a59dd973701bbd111d652387bdb6352137315 /binding/media-manager.c
parent68314a658d919a06b270340f06c162f56147c7b1 (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-manager.c')
-rw-r--r--binding/media-manager.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/binding/media-manager.c b/binding/media-manager.c
index 46c7d1d..a1f228a 100644
--- a/binding/media-manager.c
+++ b/binding/media-manager.c
@@ -33,6 +33,11 @@
#include "media-manager.h"
+const char *lms_scan_types[] = {
+ "audio",
+ "video",
+};
+
static Binding_RegisterCallback_t g_RegisterCallback = { 0 };
static stMediaPlayerManage MediaPlayerManage = { 0 };
@@ -133,6 +138,7 @@ GList* media_lightmediascanner_scan(GList *list, gchar *uri, int scan_type)
item = g_malloc0(sizeof(*item));
item->path = g_strdup_printf("file://%s", path);
+ item->type = scan_type;
item->metadata.title = g_strdup((gchar *) sqlite3_column_text(res, 1));
item->metadata.artist = g_strdup((gchar *) sqlite3_column_text(res, 2));
item->metadata.album = g_strdup((gchar *) sqlite3_column_text(res, 3));