aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;