+static char * __media_svc_extract_albumart(MMHandleType tag, const char *path, uid_t uid)
+{
+ int ret = FILEINFO_ERROR_NONE;
+ unsigned char *image = NULL;
+ unsigned int size = 0;
+ char *mimetype = NULL;
+ char thumb_path[MEDIA_SVC_PATHNAME_SIZE] = { 0, };
+ unsigned int mime_size = 0;
+
+ ret = mm_file_get_attrs(tag, MM_FILE_TAG_ARTWORK, &image, &size, NULL);
+ media_svc_retvm_if(ret != FILEINFO_ERROR_NONE, NULL, "Failed to get tag artwork[%d]", ret);
+ media_svc_retvm_if(!image || size == 0, NULL, "Invalid artwork");
+
+ ret = mm_file_get_attrs(tag, MM_FILE_TAG_ARTWORK_MIME, &mimetype, &mime_size, NULL);
+ media_svc_retvm_if(ret != FILEINFO_ERROR_NONE, NULL, "Failed to get tag mime[%d]", ret);
+ media_svc_retvm_if(mime_size == 0, NULL, "Invalid mimetype");
+
+ ret = __media_svc_get_thumbnail_path(thumb_path, path, mimetype, uid);
+ media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, NULL, "Failed to get thumbnail path");
+
+ ret = __media_svc_save_image(image, size, thumb_path, uid);
+ media_svc_retvm_if(ret != MS_MEDIA_ERR_NONE, NULL, "Fail to save thumbnail");
+
+ return g_strdup(thumb_path);
+}
+
+void _media_svc_extract_audio_metadata(sqlite3 *handle, bool is_direct, media_svc_content_info_s *content_info, uid_t uid)