return ret;
}
+int media_info_get_media_from_db_by_path(const char *path, media_info_h *media)
+{
+ int ret = MEDIA_CONTENT_ERROR_NONE;
+ media_info_s *_media = NULL;
+
+ content_retip_if_fail(STRING_VALID(path));
+ content_retip_if_fail(media);
+ ret = _media_util_check_file_exist(path);
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "_media_util_check_file_exist failed : %d", ret);
+
+#ifdef _USE_TVPD_MODE
+ char storage_id[MEDIA_CONTENT_UUID_SIZE + 1] = {0, };
+
+ ret = media_svc_get_storage_id(_content_get_db_handle(), path, storage_id, _content_get_uid());
+ if (ret != MS_MEDIA_ERR_NONE) {
+ content_error("media_svc_get_storage_id failed : %d", ret);
+ return _content_error_capi(ret);
+ }
+#endif
+
+ _media = g_new0(media_info_s, 1);
+
+#ifdef _USE_TVPD_MODE
+ ret = _media_info_get_media_info_from_db(path, STRING_VALID(storage_id) ? storage_id : DB_TABLE_MEDIA, (media_info_h)_media);
+#else
+ ret = _media_info_get_media_info_from_db(path, (media_info_h)_media);
+#endif
+ if (ret != MEDIA_CONTENT_ERROR_NONE) {
+ g_free(_media);
+ _media = NULL;
+ }
+
+ *media = (media_info_h)_media;
+
+ return ret;
+}
+
int media_info_set_favorite(media_info_h media, bool favorite)
{
media_info_s *_media = (media_info_s*)media;
{
int ret = MEDIA_CONTENT_ERROR_NONE;
char repl_path[MAX_PATH_LEN] = {0, };
- media_info_s *_info = NULL;\r
+ media_info_s *_info = NULL;
#ifdef _USE_TVPD_MODE
char storage_id[MEDIA_CONTENT_UUID_SIZE + 1] = {0, };
#endif