From: Minje Ahn Date: Mon, 29 Jun 2020 01:19:59 +0000 (+0900) Subject: Remove plugin API for folder batch insertion X-Git-Tag: accepted/tizen/unified/20200630.131147^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05f99f8f2009914416a63293f8694e7b88c5ee39;hp=4a13754c81278d820e9190da4b662984bd9cbb19;p=platform%2Fcore%2Fapi%2Fmedia-content.git 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: I0d42e1029b6d56fddd7f50d52a00e4f48c9b7542 Signed-off-by: Minje Ahn --- diff --git a/src/media_folder.c b/src/media_folder.c index 91b2354..d190f45 100755 --- a/src/media_folder.c +++ b/src/media_folder.c @@ -338,7 +338,7 @@ int media_folder_insert_to_db(const char *path) return _content_error_capi(ret); } - ret = media_svc_insert_folder(_content_get_db_handle(), storage_id, storage_type, repl_path, _content_get_uid()); + ret = media_svc_insert_folder(_content_get_db_handle(), storage_id, storage_type, repl_path, false, _content_get_uid()); if (ret != MS_MEDIA_ERR_NONE) { if (ret == MS_MEDIA_ERR_DB_CONSTRAINT_FAIL) { content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path); @@ -350,7 +350,7 @@ int media_folder_insert_to_db(const char *path) return _content_error_capi(ret); } - ret = media_svc_set_folder_scan_status(storage_id, repl_path, MEDIA_DIR_SCAN_DONE, _content_get_uid()); + ret = media_svc_set_folder_scan_status(storage_id, repl_path, MEDIA_DIR_SCAN_DONE, false, _content_get_uid()); if (ret != MS_MEDIA_ERR_NONE) { content_sec_error("ms_set_folder_scan_status failed : %d", ret); return _content_error_capi(ret); @@ -395,7 +395,7 @@ int media_folder_reset_scan_status(const char *storage_uuid, const char* path) return _content_error_capi(ret); } - ret = media_svc_set_folder_scan_status(storage_uuid, path, MEDIA_DIR_SCAN_NONE, _content_get_uid()); + ret = media_svc_set_folder_scan_status(storage_uuid, path, MEDIA_DIR_SCAN_NONE, false, _content_get_uid()); if (ret != MS_MEDIA_ERR_NONE) { content_error("media_folder_reset_scan_status failed"); return _content_error_capi(ret);