aboutsummaryrefslogtreecommitdiffstats
path: root/binding
diff options
context:
space:
mode:
authorMatt Ranostay <matt.ranostay@konsulko.com>2017-11-02 20:11:38 -0700
committerMatt Ranostay <matt.ranostay@konsulko.com>2017-11-03 19:13:57 +0000
commit34aeacdb140533e04e2d6d9512bc25c342135dc7 (patch)
treee1b3b7a92e85a569b9a05576173645953443ef6e /binding
parent8f53e0af37a77ef456debf9a3cd63a5948c12b9d (diff)
binding: mediascanner: remove superfluous local scan functioneel_4.99.3eel_4.99.2eel/4.99.3eel/4.99.24.99.34.99.2
Now lightmediascannerd scan the local ~/Music directory which has the plus of getting the metadata Bug-AGL: SPEC-1029 Change-Id: Iad13d343b8bd40cec803527b31763642bd141ded Signed-off-by: Matt Ranostay <matt.ranostay@konsulko.com>
Diffstat (limited to 'binding')
-rw-r--r--binding/media-api.c1
-rw-r--r--binding/media-manager.c36
-rw-r--r--binding/media-manager.h1
3 files changed, 0 insertions, 38 deletions
diff --git a/binding/media-api.c b/binding/media-api.c
index 82447b3..ae22fb1 100644
--- a/binding/media-api.c
+++ b/binding/media-api.c
@@ -130,7 +130,6 @@ static void media_results_get (struct afb_req request)
json_object *jresp = NULL;
ListLock();
- list = media_local_scan(NULL);
list = media_lightmediascanner_scan(list, NULL);
if (list == NULL) {
afb_req_fail(request, "failed", "media scan error");
diff --git a/binding/media-manager.c b/binding/media-manager.c
index 2907972..e0c8ae7 100644
--- a/binding/media-manager.c
+++ b/binding/media-manager.c
@@ -84,42 +84,6 @@ void DebugTraceSendMsg(int level, gchar* message)
}
-GList* media_local_scan(GList *list)
-{
- gchar *path = g_strconcat(g_get_home_dir(), "/", "Music", NULL);
- gchar *tmp = NULL;
- GDir *dir;
-
- dir = g_dir_open(path, 0, NULL);
- if (dir == NULL)
- {
- LOGE("Cannot open media path %s\n", path);
- return list;
- }
-
- while ((tmp = (gchar *) g_dir_read_name(dir)) != NULL)
- {
- struct Media_Item *item = g_malloc0(sizeof(*item));
- gchar *p = g_strconcat(path, "/", tmp, NULL);
- GStatBuf buf;
-
- if (g_stat(p, &buf) != 0 || !S_ISREG(buf.st_mode)) {
- g_free(p);
- continue;
- }
-
- item->path = g_strconcat("file://", p, NULL);
- g_free(p);
-
- list = g_list_append(list, item);
- }
-
- g_free(path);
- g_dir_close(dir);
-
- return list;
-}
-
GList* media_lightmediascanner_scan(GList *list, gchar *uri)
{
sqlite3 *conn;
diff --git a/binding/media-manager.h b/binding/media-manager.h
index 148f241..2e5c0d3 100644
--- a/binding/media-manager.h
+++ b/binding/media-manager.h
@@ -109,7 +109,6 @@ void ListLock();
void ListUnlock();
GList* media_lightmediascanner_scan(GList *list, gchar *uri);
-GList* media_local_scan(GList *list);
struct Media_Item {
gchar *path;