/*insert column info.. */
/*media*/
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_uuid", MEDIA_SVC_DB_TYPE_TEXT, "PRIMARY KEY", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_id", MEDIA_SVC_DB_TYPE_TEXT, "PRIMARY KEY", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "path", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL UNIQUE", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_path", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL UNIQUE", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "file_name", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, "media_file_name_idx", false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_display_name", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, "media_file_name_idx", false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_type", MEDIA_SVC_DB_TYPE_INT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "mime_type", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_mime_type", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "size", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_size", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "added_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_added_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "modified_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, "media_modified_time_idx", false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_modified_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, "media_modified_time_idx", false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "folder_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, "folder_uuid_idx", false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "thumbnail_path", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_thumbnail_path", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "title", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_title", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "album_id", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "album", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_album", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "artist", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_artist", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "album_artist", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_album_artist", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "genre", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_genre", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "composer", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_composer", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "year", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_year", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "recorded_date", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_recorded_date", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "copyright", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_copyright", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "track_num", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_track_num", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "description", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_description", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "bitrate", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_bitrate", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "bitpersample", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V3, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_bitpersample", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V3, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "samplerate", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_samplerate", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "channel", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_channel", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "duration", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_duration", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "longitude", MEDIA_SVC_DB_TYPE_DOUBLE, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_longitude", MEDIA_SVC_DB_TYPE_DOUBLE, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "latitude", MEDIA_SVC_DB_TYPE_DOUBLE, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_latitude", MEDIA_SVC_DB_TYPE_DOUBLE, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "altitude", MEDIA_SVC_DB_TYPE_DOUBLE, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_altitude", MEDIA_SVC_DB_TYPE_DOUBLE, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "exposure_time", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V4, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "model", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V4, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "width", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_width", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "height", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_height", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "datetaken", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_datetaken", MEDIA_SVC_DB_TYPE_TEXT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "orientation", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_orientation", MEDIA_SVC_DB_TYPE_INT, "DEFAULT -1", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "rating", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_rating", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "favourite", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_favourite", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "is_drm", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_is_drm", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "storage_type", MEDIA_SVC_DB_TYPE_INT, NULL, USER_V2, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_storage_type", MEDIA_SVC_DB_TYPE_INT, NULL, USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "timeline", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, "media_timeline_idx", false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_timeline", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, "media_timeline_idx", false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "sync_status", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "validity", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 1", USER_V2, NULL, false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
/* color column is added with dcm. (DB v5) */
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "is_360", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V5, NULL, false, false, true);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_MEDIA], "media_360", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V5, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
/*folder*/
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_PLAYLIST_MAP], "playlist_id", MEDIA_SVC_DB_TYPE_INT, "NOT NULL", USER_V2, NULL, false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_PLAYLIST_MAP], "media_uuid", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, false, true, false);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_PLAYLIST_MAP], "media_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, false, true, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_PLAYLIST_MAP], "playlist_member_order", MEDIA_SVC_DB_TYPE_INT, "NOT NULL", USER_V2, NULL, false, false, true);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_TAG_MAP], "tag_id", MEDIA_SVC_DB_TYPE_INT, "NOT NULL", USER_V2, NULL, true, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_TAG_MAP], "media_uuid", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, true, true, false);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_TAG_MAP], "media_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, true, true, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
/*tag*/
/*bookmark*/
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_BOOKMARK], "bookmark_id", MEDIA_SVC_DB_TYPE_INT, "PRIMARY KEY AUTOINCREMENT", USER_V2, NULL, false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_BOOKMARK], "media_uuid", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, true, true, false);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_BOOKMARK], "media_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V2, NULL, true, true, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_BOOKMARK], "bookmark_marked_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V2, NULL, true, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
/*face scan list*/
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE_SCAN_LIST], "media_uuid", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL UNIQUE", USER_V4, NULL, false, true, false);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE_SCAN_LIST], "media_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL UNIQUE", USER_V4, NULL, false, true, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE_SCAN_LIST], "modified_time", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V6, NULL, false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
/*face*/
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE], "media_face_id", MEDIA_SVC_DB_TYPE_INT, "PRIMARY KEY AUTOINCREMENT", USER_V4, NULL, false, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
- ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE], "media_uuid", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V4, NULL, true, true, false);
+ ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE], "media_id", MEDIA_SVC_DB_TYPE_TEXT, "NOT NULL", USER_V4, NULL, true, true, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
ret = __media_svc_add_column_info(&column_list[MEDIA_SVC_DB_LIST_FACE], "face_rect_x", MEDIA_SVC_DB_TYPE_INT, "DEFAULT 0", USER_V4, NULL, true, false, false);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "Path is NULL");
- sql = sqlite3_mprintf("SELECT count(*) FROM '%q' WHERE path='%q'", storage_id, path);
+ sql = sqlite3_mprintf("SELECT count(*) FROM '%q' WHERE MEDIA_path='%q'", storage_id, path);
ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "Path is NULL");
- sql = sqlite3_mprintf("SELECT modified_time FROM '%q' WHERE path='%q'", storage_id, path);
+ sql = sqlite3_mprintf("SELECT media_modified_time FROM '%q' WHERE MEDIA_path='%q'", storage_id, path);
ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
{
int ret = MS_MEDIA_ERR_NONE;
- const char *db_fields = "media_uuid, path, file_name, media_type, mime_type, size, added_time, modified_time, folder_id, thumbnail_path, \
- title, album_id, album, artist, album_artist, genre, composer, year, recorded_date, copyright, track_num, description, \
- favourite, bitrate, bitpersample, samplerate, channel, duration, \
- longitude, latitude, altitude, exposure_time, fnumber, iso, model, width, height, datetaken, orientation, rating, is_drm, storage_type, timeline, sync_status, \
- media_file_name_pinyin, media_title_pinyin, media_album_pinyin, media_artist_pinyin, media_album_artist_pinyin, media_genre_pinyin, media_composer_pinyin, media_copyright_pinyin, media_description_pinyin, storage_uuid, is_360";
+ const char *db_fields = "media_id, media_path, media_display_name, media_type, media_mime_type, media_size, media_added_time, media_modified_time, folder_id, media_thumbnail_path, \
+ media_title, album_id, media_album, media_artist, media_album_artist, media_genre, media_composer, media_year, media_recorded_date, media_copyright, media_track_num, media_description, \
+ media_favourite, media_bitrate, media_bitpersample, media_samplerate, media_channel, media_duration, \
+ media_longitude, media_latitude, media_altitude, exposure_time, fnumber, iso, model, media_width, media_height, media_datetaken, media_orientation, media_rating, media_is_drm, media_storage_type, media_timeline, sync_status, \
+ media_file_name_pinyin, media_title_pinyin, media_album_pinyin, media_artist_pinyin, media_album_artist_pinyin, media_genre_pinyin, media_composer_pinyin, media_copyright_pinyin, media_description_pinyin, storage_uuid, media_360";
- const char *db_fields_basic = "media_uuid, path, file_name, media_type, mime_type, size, added_time, modified_time, folder_id, thumbnail_path, \
- album_id, favourite, is_drm, storage_type, timeline, sync_status, media_file_name_pinyin, storage_uuid, is_360";
+ const char *db_fields_basic = "media_id, media_path, media_display_name, media_type, media_mime_type, media_size, media_added_time, media_modified_time, folder_id, media_thumbnail_path, \
+ album_id, media_favourite, media_is_drm, media_storage_type, media_timeline, sync_status, media_file_name_pinyin, storage_uuid, media_360";
/* This sql is due to sqlite3_mprintf's wrong operation when using floating point in the text format */
/* This code will be removed when sqlite3_mprintf works clearly */
_media_svc_get_pinyin_str(content_info->media_meta.description, &content_info->media_meta.description_pinyin);
}
- char *sql = sqlite3_mprintf("UPDATE '%q' SET title=%Q, album=%Q, artist=%Q, album_artist=%Q, genre=%Q, composer=%Q, copyright=%Q, description=%Q, \
+ char *sql = sqlite3_mprintf("UPDATE '%q' SET media_title=%Q, media_album=%Q, media_artist=%Q, media_album_artist=%Q, media_genre=%Q, media_composer=%Q, media_copyright=%Q, media_description=%Q, \
media_file_name_pinyin=%Q, media_title_pinyin=%Q, media_album_pinyin=%Q, media_artist_pinyin=%Q, media_album_artist_pinyin=%Q, media_genre_pinyin=%Q, media_composer_pinyin=%Q, media_copyright_pinyin=%Q, media_description_pinyin=%Q \
WHERE path=%Q;",
content_info->storage_uuid,
_media_svc_get_pinyin_str(content_info->media_meta.description, &content_info->media_meta.description_pinyin);
}
- char *sql = sqlite3_mprintf("UPDATE '%q' SET size=%lld, modified_time=%d, thumbnail_path=%Q, title=%Q, album_id=%d, album=%Q, artist=%Q, album_artist=%Q, genre=%Q, \
- composer=%Q, year=%Q, recorded_date=%Q, copyright=%Q, track_num=%Q, description=%Q, bitrate=%d, bitpersample=%d, samplerate=%d, channel=%d, duration=%d, \
- longitude=%f, latitude=%f, altitude=%f, exposure_time=%Q, fnumber=%f, iso=%d, model=%Q, width=%d, height=%d, datetaken=%Q, orientation=%d WHERE path=%Q;",
+ char *sql = sqlite3_mprintf("UPDATE '%q' SET media_size=%lld, media_modified_time=%d, media_thumbnail_path=%Q, media_title=%Q, album_id=%d, media_album=%Q, media_artist=%Q, media_album_artist=%Q, media_genre=%Q, \
+ media_composer=%Q, media_year=%Q, media_recorded_date=%Q, media_copyright=%Q, media_track_num=%Q, media_description=%Q, media_bitrate=%d, media_bitpersample=%d, media_samplerate=%d, media_channel=%d, media_duration=%d, \
+ media_longitude=%f, media_latitude=%f, media_altitude=%f, exposure_time=%Q, fnumber=%f, iso=%d, model=%Q, media_width=%d, media_height=%d, media_datetaken=%Q, media_orientation=%d WHERE media_path=%Q;",
storage_id,
content_info->size,
content_info->modified_time,
media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
- sql = sqlite3_mprintf("SELECT thumbnail_path FROM '%q' WHERE path='%q'", MEDIA_SVC_DB_VIEW_MEDIA, path);
+ sql = sqlite3_mprintf("SELECT media_thumbnail_path FROM '%q' WHERE media_path='%q'", MEDIA_SVC_DB_VIEW_MEDIA, path);
ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
- sql = sqlite3_mprintf("SELECT media_type FROM '%q' WHERE path='%q'", storage_id, path);
+ sql = sqlite3_mprintf("SELECT media_type FROM '%q' WHERE media_path='%q'", storage_id, path);
ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
media_svc_retvm_if(!STRING_VALID(storage_id), MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
- sql = sqlite3_mprintf("DELETE FROM '%q' WHERE path='%q';", storage_id, path);
+ sql = sqlite3_mprintf("DELETE FROM '%q' WHERE media_path='%q';", storage_id, path);
if (!stack_query) {
ret = _media_svc_sql_query(sql, uid);
media_svc_debug("path=[%s], validity=[%d]", path, validity);
- sql = sqlite3_mprintf("UPDATE '%q' SET validity=%d WHERE path= '%q';", storage_id, validity, path);
+ sql = sqlite3_mprintf("UPDATE '%q' SET validity=%d WHERE media_path='%q';", storage_id, validity, path);
if (!stack_query) {
ret = _media_svc_sql_query(sql, uid);
{
int ret = MS_MEDIA_ERR_NONE;
- char *sql = sqlite3_mprintf("UPDATE '%q' SET thumbnail_path=%Q WHERE path=%Q;", storage_id, thumb_path, path);
+ char *sql = sqlite3_mprintf("UPDATE '%q' SET media_thumbnail_path=%Q WHERE media_path=%Q;", storage_id, thumb_path, path);
ret = _media_svc_sql_query(sql, uid);
SQLITE3_SAFE_FREE(sql);
3. Remove source info
*/
int ret = MS_MEDIA_ERR_NONE;
- char *update = sqlite3_mprintf("UPDATE '%q' SET path=%Q, file_name=%Q, modified_time=%d, folder_id=%Q, storage_type=%d, storage_uuid='%q' WHERE path=%Q;",
+ char *update = sqlite3_mprintf("UPDATE '%q' SET media_path=%Q, media_display_name=%Q, media_modified_time=%d, folder_id=%Q, media_storage_type=%d, storage_uuid='%q' WHERE media_path=%Q;",
org_storage_id, dest_path, file_name, modified_time, folder_uuid, dest_storage, dst_storage_id, src_path);
- char *insert = sqlite3_mprintf("INSERT OR REPLACE INTO '%q' SELECT * FROM '%q' WHERE path = '%q';", dst_storage_id, org_storage_id, dest_path);
- char *remove = sqlite3_mprintf("DELETE FROM '%q' WHERE path = '%q';", org_storage_id, dest_path);
+ char *insert = sqlite3_mprintf("INSERT OR REPLACE INTO '%q' SELECT * FROM '%q' WHERE media_path = '%q';", dst_storage_id, org_storage_id, dest_path);
+ char *remove = sqlite3_mprintf("DELETE FROM '%q' WHERE media_path = '%q';", org_storage_id, dest_path);
char *query = NULL;
if (strcmp(org_storage_id, dst_storage_id) != 0)
media_svc_retvm_if(!STRING_VALID(path), MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
if (update_item == MS_MEDIA_ITEM_FILE)
- sql = sqlite3_mprintf("SELECT media_uuid, media_type, mime_type FROM '%q' WHERE path=%Q", storage_id, path);
+ sql = sqlite3_mprintf("SELECT media_id, media_type, media_mime_type FROM '%q' WHERE media_path=%Q", storage_id, path);
else if (update_item == MS_MEDIA_ITEM_DIRECTORY)
sql = sqlite3_mprintf("SELECT folder_id FROM '%q' WHERE folder_path=%Q AND storage_uuid='%q'", MEDIA_SVC_DB_TABLE_FOLDER, path, storage_id);
else {