aboutsummaryrefslogtreecommitdiffstats
path: root/binding/media-manager.c
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-12-07 17:57:38 -0800
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2017-12-13 21:36:43 +0000
commit33850f0e8b2e87675d29f84850123465ec931036 (patch)
treec2bd201c71f65e3e6954ad2d3f20493e32103de2 /binding/media-manager.c
parent08013b90239fbfd4e49c5c121fed423b6a12e449 (diff)
binding: mediascanner: add video scan from lightmediascannereel_5.0.0eel_4.99.5eel/5.0.0eel/4.99.55.0.04.99.5
Add to the playlist the video media found from the lightmediascanner database. Bug-AGL: SPEC-1169 Change-Id: I9ebf2e21805fe0e59a853dd081eacf02af501c96 Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding/media-manager.c')
-rw-r--r--binding/media-manager.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/binding/media-manager.c b/binding/media-manager.c
index e0c8ae7..46c7d1d 100644
--- a/binding/media-manager.c
+++ b/binding/media-manager.c
@@ -84,7 +84,7 @@ void DebugTraceSendMsg(int level, gchar* message)
}
-GList* media_lightmediascanner_scan(GList *list, gchar *uri)
+GList* media_lightmediascanner_scan(GList *list, gchar *uri, int scan_type)
{
sqlite3 *conn;
sqlite3_stmt *res;
@@ -101,7 +101,15 @@ GList* media_lightmediascanner_scan(GList *list, gchar *uri)
return NULL;
}
- query = g_strdup_printf(SQL_QUERY, uri ? uri : "");
+ switch (scan_type) {
+ case LMS_VIDEO_SCAN:
+ query = g_strdup_printf(VIDEO_SQL_QUERY, uri ? uri : "");
+ break;
+ case LMS_AUDIO_SCAN:
+ default:
+ query = g_strdup_printf(AUDIO_SQL_QUERY, uri ? uri : "");
+ }
+
if (!query) {
LOGE("Cannot allocate memory for query\n");
return NULL;
@@ -183,7 +191,8 @@ on_interface_proxy_properties_changed (GDBusProxy *proxy,
ListLock();
- list = media_lightmediascanner_scan(list, MediaPlayerManage.uri_filter);
+ list = media_lightmediascanner_scan(list, MediaPlayerManage.uri_filter, LMS_AUDIO_SCAN);
+ list = media_lightmediascanner_scan(list, MediaPlayerManage.uri_filter, LMS_VIDEO_SCAN);
g_free(MediaPlayerManage.uri_filter);
MediaPlayerManage.uri_filter = NULL;