diff options
author | Nilesh <t.shripati@samsung.com> | 2018-12-21 11:53:16 +0530 |
---|---|---|
committer | Nilesh <t.shripati@samsung.com> | 2018-12-21 11:53:16 +0530 |
commit | acb4a5d41cc2adf3432e188936281f2fbdbac8c6 (patch) | |
tree | d3b7f8584ae23942cf99c94ce1a4b287aa2b2fd7 | |
parent | 0edf5d67758ead21245f4d72fdcf795811705d64 (diff) | |
download | gallery-tizen_5.5.tar.gz gallery-tizen_5.5.tar.bz2 gallery-tizen_5.5.zip |
Remove media content deprecated API.tizen_6.5_src.m2_releasetizen_6.0_src.m2_releasetizen_5.5_src.m2_releasesubmit/tizen_6.5/20211029.123901submit/tizen_6.5/20211028.164201submit/tizen_6.0_hotfix/20201103.115105submit/tizen_6.0_hotfix/20201102.192905submit/tizen_6.0/20201029.205505submit/tizen_5.5_wearable_hotfix/20201027.114701submit/tizen_5.5_wearable_hotfix/20201026.1843010submit/tizen_5.5_mobile_hotfix/20201125.191001submit/tizen_5.5_mobile_hotfix/20201027.114301submit/tizen_5.5_mobile_hotfix/20201026.1851010submit/tizen_5.5/20191031.000001submit/tizen/20200205.125014submit/tizen/20181224.162738tizen_6.5tizen_6.0_hotfixtizen_6.0tizen_5.5_wearable_hotfixtizen_5.5_mobile_hotfixtizen_5.5
This patch remove media content deprecated API,
media_info_delete_from_db().
Change-Id: I755dc3673b506e5b23eb660e1826886c11d2eef8
-rw-r--r-- | gallery/model/MediaItem.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/gallery/model/MediaItem.cpp b/gallery/model/MediaItem.cpp index fd21ffc..2ad27c7 100644 --- a/gallery/model/MediaItem.cpp +++ b/gallery/model/MediaItem.cpp @@ -383,12 +383,6 @@ namespace gallery { { MutexLock lock(getMediaMutex()); - - const int ret = media_info_delete_from_db(m_mediaId.c_str()); - if (ret != 0) { - LOG_RETURN(RES_FAIL, "media_info_delete_from_db() failed: %d", ret); - } - m_media = nullptr; m_isValid = false; } @@ -403,7 +397,22 @@ namespace gallery { } return RES_FATAL; } - + if (m_mediaId.c_str() != NULL) { + int ret = MEDIA_CONTENT_ERROR_NONE; + MutexLock lock(getMediaMutex()); + ret = media_content_connect(); + if (ret == MEDIA_CONTENT_ERROR_NONE) { + ret = media_content_scan_file(m_filePath.c_str()); + if (ret != MEDIA_CONTENT_ERROR_NONE) { + media_content_disconnect(); + LOG_RETURN(RES_FAIL, "media_content_scan_file() failed: %d", ret); + } + media_content_disconnect(); + } + else { + LOG_RETURN(RES_FAIL, "media_content_connect() failed : %d", ret); + } + } return RES_OK; } |