From 02066a3b2a29480e028cea5565be1cc9461985ee Mon Sep 17 00:00:00 2001 From: Minje Ahn Date: Wed, 15 May 2019 11:19:37 +0900 Subject: [PATCH] Modify scanner progress If the modified time of the database and the file system are different, use UPDATE instead of DELETE/INSERT. Change-Id: Icac44c0daf8165ca440d0e0c08d4529472c5630d Signed-off-by: Minje Ahn --- src/media_content.c | 2 +- src/media_info.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/media_content.c b/src/media_content.c index 0a40528..c9ae3e2 100755 --- a/src/media_content.c +++ b/src/media_content.c @@ -324,7 +324,7 @@ int media_content_scan_file(const char *path) ret = media_svc_check_item_exist_by_path(_content_get_db_handle(), storage_id, repl_path); if (ret == MS_MEDIA_ERR_NONE) { /* Refresh */ - ret = media_svc_refresh_item(_content_get_db_handle(), storage_id, storage_type, repl_path, _content_get_uid()); + ret = media_svc_refresh_item(_content_get_db_handle(), false, storage_id, storage_type, repl_path, _content_get_uid()); if (ret != MS_MEDIA_ERR_NONE) { media_content_error("media_svc_refresh_item failed : %d", ret); return _content_error_capi(ret); diff --git a/src/media_info.c b/src/media_info.c index 0311f61..79e7591 100755 --- a/src/media_info.c +++ b/src/media_info.c @@ -424,7 +424,7 @@ int media_info_insert_to_db(const char *path, media_info_h *info) if (ret == MS_MEDIA_ERR_NONE) { /* Refresh if need */ if (modified_time != _media_util_get_file_time(repl_path)) { - ret = media_svc_refresh_item(_content_get_db_handle(), storage_id, storage_type, repl_path, _content_get_uid()); + ret = media_svc_refresh_item(_content_get_db_handle(), false, storage_id, storage_type, repl_path, _content_get_uid()); if (ret != MS_MEDIA_ERR_NONE) { media_content_error("media_svc_refresh_item failed : %d", ret); return _content_error_capi(ret); -- 2.7.4