diff options
-rwxr-xr-x | packaging/capi-content-media-content.spec | 2 | ||||
-rwxr-xr-x | src/media_info.c | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/packaging/capi-content-media-content.spec b/packaging/capi-content-media-content.spec index bd7145a..7b390d8 100755 --- a/packaging/capi-content-media-content.spec +++ b/packaging/capi-content-media-content.spec @@ -1,6 +1,6 @@ Name: capi-content-media-content Summary: A Media content library in Tizen Native API -Version: 0.2.86 +Version: 0.2.87 Release: 0 Group: Multimedia/API License: Apache-2.0 diff --git a/src/media_info.c b/src/media_info.c index ca7d0b1..39f7435 100755 --- a/src/media_info.c +++ b/src/media_info.c @@ -394,7 +394,9 @@ int _media_info_get_media_info_from_db(const char *path, const char *storage_id, _media_info_item_get_detail(stmt, (media_info_h)_media); } else { media_content_error("There's no media!!"); - ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER; + media_content_error("%s", path); + media_content_error("%s", storage_id); + ret = MEDIA_CONTENT_ERROR_DB_FAILED; } SQLITE3_FINALIZE(stmt); @@ -3442,6 +3444,7 @@ static int __media_info_destroy(media_info_h media) int media_info_insert_to_db_with_data(media_info_h media) { int ret = MEDIA_CONTENT_ERROR_NONE; + int ret_cnt = 0; char repl_path[MAX_QUERY_SIZE] = {0, }; media_info_s *_media = (media_info_s*)media; @@ -3490,9 +3493,16 @@ int media_info_insert_to_db_with_data(media_info_h media) char *media_string_uuid = g_strdup(_media->storage_uuid); __media_info_destroy(media); +RETRY: ret = _media_info_get_media_info_from_db(media_file_path, media_string_uuid, media); - if (ret != MEDIA_CONTENT_ERROR_NONE) + if (ret != MEDIA_CONTENT_ERROR_NONE) { media_content_error("_media_info_get_media_info_from_db fail", ret); + if (ret == MEDIA_CONTENT_ERROR_DB_FAILED && ret_cnt < 5) { + ret_cnt++; + media_content_error("RETRY GETTING DATA"); + goto RETRY; + } + } SAFE_FREE(media_file_path); SAFE_FREE(media_string_uuid); |