SAFE_FREE(data);
DB_UPDATE:
- err = _media_thumb_update_db(origin_path, thumb_path, res_msg->origin_width, res_msg->origin_height, req_msg->uid);
+ err = _media_thumb_update_db(origin_path, thumb_path, req_msg->uid);
if (err != MS_MEDIA_ERR_NONE) {
thumb_err("_media_thumb_update_db failed : %d", err);
res_msg->status = err;
#define SELECT_THUMB_BY_PATH "SELECT thumbnail_path, width, height FROM media WHERE path='%q' AND thumbnail_path IS NOT NULL;"
#define UPDATE_THUMB_BY_PATH "UPDATE media SET thumbnail_path = '%q' WHERE path='%q';"
-#define UPDATE_THUMB_WH_BY_PATH "UPDATE media SET thumbnail_path = '%q', width=%d,height=%d WHERE path='%q';"
int _media_thumb_get_thumb_from_db_with_size(const char *origin_path, char *thumb_path, int max_length, int *width, int *height, uid_t uid);
-int _media_thumb_update_db(const char *origin_path, char *thumb_path, int width, int height, uid_t uid);
+int _media_thumb_update_db(const char *origin_path, char *thumb_path, uid_t uid);
#endif /*_MEDIA_THUMB_DB_H_*/
return MS_MEDIA_ERR_NONE;
}
-int _media_thumb_update_db(const char *origin_path, char *thumb_path, int width, int height, uid_t uid)
+int _media_thumb_update_db(const char *origin_path, char *thumb_path, uid_t uid)
{
int err = MS_MEDIA_ERR_NONE;
char *query_string = NULL;
thumb_retvm_if(!STRING_VALID(origin_path), MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid origin_path");
- if (width > 0 && height > 0)
- query_string = sqlite3_mprintf(UPDATE_THUMB_WH_BY_PATH, thumb_path, width, height, origin_path);
- else
- query_string = sqlite3_mprintf(UPDATE_THUMB_BY_PATH, thumb_path, origin_path);
-
+ query_string = sqlite3_mprintf(UPDATE_THUMB_BY_PATH, thumb_path, origin_path);
thumb_retvm_if(!STRING_VALID(query_string), MS_MEDIA_ERR_OUT_OF_MEMORY, "Memory allocation is failed");
err = media_db_request_update_db(query_string, uid);