summaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
Diffstat (limited to 'binding')
-rw-r--r--binding/media-api.c4
-rw-r--r--binding/media-manager.c7
-rw-r--r--binding/media-manager.h2
3 files changed, 6 insertions, 7 deletions
diff --git a/binding/media-api.c b/binding/media-api.c
index fb0145f..82447b3 100644
--- a/binding/media-api.c
+++ b/binding/media-api.c
@@ -130,8 +130,8 @@ static void media_results_get (struct afb_req request)
json_object *jresp = NULL;
ListLock();
- list = media_lightmediascanner_scan(NULL);
- list = media_local_scan(list);
+ list = media_local_scan(NULL);
+ list = media_lightmediascanner_scan(list, NULL);
if (list == NULL) {
afb_req_fail(request, "failed", "media scan error");
ListUnlock();
diff --git a/binding/media-manager.c b/binding/media-manager.c
index 63dd4ff..445c7f9 100644
--- a/binding/media-manager.c
+++ b/binding/media-manager.c
@@ -109,11 +109,10 @@ GList* media_local_scan(GList *list)
return list;
}
-GList* media_lightmediascanner_scan(gchar *uri)
+GList* media_lightmediascanner_scan(GList *list, gchar *uri)
{
sqlite3 *conn;
sqlite3_stmt *res;
- GList *list = NULL;
const char *tail;
const gchar *db_path;
gchar *query;
@@ -185,7 +184,7 @@ on_interface_proxy_properties_changed (GDBusProxy *proxy,
const gchar *key;
GVariant *subValue;
const gchar *pInterface;
- GList *list;
+ GList *list = NULL;
pInterface = g_dbus_proxy_get_interface_name (proxy);
@@ -209,7 +208,7 @@ on_interface_proxy_properties_changed (GDBusProxy *proxy,
ListLock();
- list = media_lightmediascanner_scan(MediaPlayerManage.uri_filter);
+ list = media_lightmediascanner_scan(list, MediaPlayerManage.uri_filter);
g_free(MediaPlayerManage.uri_filter);
MediaPlayerManage.uri_filter = NULL;
diff --git a/binding/media-manager.h b/binding/media-manager.h
index 69c866b..148f241 100644
--- a/binding/media-manager.h
+++ b/binding/media-manager.h
@@ -108,7 +108,7 @@ int MediaPlayerManagerInit(void);
void ListLock();
void ListUnlock();
-GList* media_lightmediascanner_scan(gchar *uri);
+GList* media_lightmediascanner_scan(GList *list, gchar *uri);
GList* media_local_scan(GList *list);
struct Media_Item {