From 91d0d84dcf82f34584ebead112beaa0cab0cdc2c Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Mon, 29 Jun 2020 10:21:28 +0900 Subject: [PATCH] Remove plugin API for folder batch insertion This patch changes media-scanner-v2 to write directly to media.db. It makes better performance than bulk insert through IPC. Change-Id: Ic8c54363a9f9e7366a2506e57f1e9ab7834bc9f1 Signed-off-by: Minje Ahn --- plugin/media-content-plugin.c | 12 ------------ src/common/media-svc.c | 12 ++++++------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/plugin/media-content-plugin.c b/plugin/media-content-plugin.c index 1a6cbd9..ea0fb61 100755 --- a/plugin/media-content-plugin.c +++ b/plugin/media-content-plugin.c @@ -174,18 +174,6 @@ int delete_invalid_folder_by_path(sqlite3 *handle, const char *storage_id, const return MS_MEDIA_ERR_NONE; } -int insert_folder_begin(int item_cnt) -{ - /* For scanner V2 */ - return MS_MEDIA_ERR_NONE; -} - -int insert_folder_end(uid_t uid) -{ - /* For scanner V2 */ - return MS_MEDIA_ERR_NONE; -} - int insert_folder(sqlite3 *handle, const char *storage_id, const char *file_path, int storage_type, uid_t uid) { return media_svc_insert_folder(handle, storage_id, storage_type, file_path, uid); diff --git a/src/common/media-svc.c b/src/common/media-svc.c index 5f8d1c1..0ca6a5e 100755 --- a/src/common/media-svc.c +++ b/src/common/media-svc.c @@ -323,12 +323,12 @@ int media_svc_insert_item_immediately(sqlite3 *handle, const char *storage_id, m } int media_svc_move_item(sqlite3 *handle, - const char *src_path, - const char *dest_path, - const char *media_id, - int media_type, - const char *mime_type, - uid_t uid) + const char *src_path, + const char *dest_path, + const char *media_id, + int media_type, + const char *mime_type, + uid_t uid) { int ret = MS_MEDIA_ERR_NONE; char *file_name = NULL; -- 2.7.4