Fix build error when _USE_TVPD_MODE is enabled 23/241423/1 accepted/tizen/unified/20200826.133148 submit/tizen/20200820.053439 submit/tizen/20200820.222144 submit/tizen/20200820.234531
authorjiyong.min <jiyong.min@samsung.com>
Thu, 20 Aug 2020 04:54:58 +0000 (13:54 +0900)
committerjiyong.min <jiyong.min@samsung.com>
Thu, 20 Aug 2020 04:58:14 +0000 (13:58 +0900)
Change-Id: I2ba0a15428883d8a9cfc56a5a46539137d184ebb

packaging/capi-content-media-content.spec
src/media_info.c

index d67c72c..8d590f6 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-content-media-content
 Summary:    A Media content library in Tizen Native API
-Version:    0.4.11
+Version:    0.4.12
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 6d8ba72..47b6a4d 100644 (file)
@@ -1379,7 +1379,10 @@ int media_info_move_to_db(media_info_h media, const char* dst_path)
 {
        int ret = MEDIA_CONTENT_ERROR_NONE;
        char repl_path[MAX_PATH_LEN] = {0, };
-       media_info_s *_info = NULL;
+       media_info_s *_info = NULL;\r
+#ifdef _USE_TVPD_MODE
+       char storage_id[MEDIA_CONTENT_UUID_SIZE + 1] = {0, };
+#endif
 
        content_retip_if_fail(media);
        content_retip_if_fail(STRING_VALID(dst_path));
@@ -1410,7 +1413,14 @@ int media_info_move_to_db(media_info_h media, const char* dst_path)
        /* Update media_info handle */
        _info = g_new0(media_info_s, 1);
 
+#ifdef _USE_TVPD_MODE
+       ret = media_svc_get_storage_id(_content_get_db_handle(), repl_path, storage_id, _content_get_uid());
+       content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+
+       ret = _media_info_get_media_info_from_db(repl_path, storage_id, (media_info_h)_info);
+#else
        ret = _media_info_get_media_info_from_db(repl_path, (media_info_h)_info);
+#endif
 
        SAFE_FREE(_media->display_name);
        _media->display_name = g_strdup(_info->display_name);