Remove plugin API for folder batch insertion 94/237294/5 accepted/tizen/unified/20200630.131151 submit/tizen/20200630.065716
authorMinje Ahn <minje.ahn@samsung.com>
Mon, 29 Jun 2020 01:21:28 +0000 (10:21 +0900)
committerMinje ahn <minje.ahn@samsung.com>
Tue, 30 Jun 2020 01:58:44 +0000 (01:58 +0000)
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 <minje.ahn@samsung.com>
plugin/media-content-plugin.c
src/common/media-svc.c

index 1a6cbd9..ea0fb61 100755 (executable)
@@ -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);
index 5f8d1c1..0ca6a5e 100755 (executable)
@@ -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;