Update default value in metadata 22/118122/3 accepted/tizen/common/20170309.175549 accepted/tizen/ivi/20170310.031853 accepted/tizen/mobile/20170310.031742 accepted/tizen/tv/20170310.031818 accepted/tizen/unified/20170313.080125 accepted/tizen/wearable/20170310.031837 submit/tizen/20170309.081455 submit/tizen_unified/20170310.011402 submit/tizen_unified/20170313.075707
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 9 Mar 2017 01:30:27 +0000 (10:30 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Thu, 9 Mar 2017 02:53:52 +0000 (11:53 +0900)
Change "Unkown" to empty string

Change-Id: I09e4229ae2a98195ae3f9721521821e24fc2bdde
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
packaging/libmedia-service.spec
src/common/media-svc-util.c
src/include/common/media-svc-env.h

index e936cf7..325f9ae 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmedia-service
 Summary:    Media information service library for multimedia applications
-Version: 0.2.93
+Version: 0.2.94
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0 and public domain
index 2ad040d..7321ccd 100755 (executable)
@@ -1120,37 +1120,37 @@ int _media_svc_set_default_value(media_svc_content_info_s *content_info, bool re
                SAFE_FREE(title);
        } else {
                media_svc_error("Can't extract title");
-               ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.title, MEDIA_SVC_TAG_UNKNOWN);
-               media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+               content_info->media_meta.title = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+               media_svc_retv_del_if(content_info->media_meta.title == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
        }
 
        /* Set default value before extracting meta information */
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.description, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.description = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.description == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.copyright, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.copyright = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.copyright == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.track_num, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.track_num = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.track_num == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.album, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.album = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.album == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.artist, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.artist = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.artist == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.album_artist, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.album_artist = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.album_artist == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.genre, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.genre = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.genre == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.composer, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.composer = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.composer == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
-       ret = __media_svc_malloc_and_strncpy(&content_info->media_meta.year, MEDIA_SVC_TAG_UNKNOWN);
-       media_svc_retv_del_if(ret != MS_MEDIA_ERR_NONE, ret, content_info);
+       content_info->media_meta.year = g_strdup(MEDIA_SVC_TAG_UNKNOWN);
+       media_svc_retv_del_if(content_info->media_meta.year == NULL, MS_MEDIA_ERR_INTERNAL, content_info);
 
        if (refresh) {
                media_svc_debug("refresh");
index d72a1de..c61f5ce 100755 (executable)
@@ -134,7 +134,7 @@ extern "C" {
 #define MEDIA_SVC_PATHNAME_SIZE                                4096                                    /**< Length of Path name. */
 #define MEDIA_SVC_UUID_SIZE                                            36                                              /**< Length of UUID*/
 
-#define MEDIA_SVC_TAG_UNKNOWN                          "Unknown"
+#define MEDIA_SVC_TAG_UNKNOWN                          ""
 #define MEDIA_SVC_MEDIA_PATH                                   tzplatform_mkpath(TZ_USER_SHARE, "media")                       /**< Media path*/
 #define MEDIA_SVC_THUMB_PATH_PREFIX                    tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb")                        /**< Thumbnail path prefix*/
 #define MEDIA_SVC_THUMB_INTERNAL_PATH          tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb/phone")  /**< Phone thumbnail path*/