- /* 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 */
- char *test_sql = sqlite3_mprintf("%f, %f, %f", _media->longitude, _media->latitude, _media->altitude);
- SQLITE3_SAFE_FREE(test_sql);
-
- /*Update Pinyin If Support Pinyin*/
- char *file_name_pinyin = NULL;
- char *description_pinyin = NULL;
- bool pinyin_support = FALSE;
-
- /*Update Pinyin If Support Pinyin*/
- media_svc_check_pinyin_support(&pinyin_support);
- if (pinyin_support) {
- if (STRING_VALID(_media->display_name))
- media_svc_get_pinyin(_media->display_name, &file_name_pinyin);
- if (STRING_VALID(_media->description))
- media_svc_get_pinyin(_media->description, &description_pinyin);
- }
-#ifdef _USE_TVPD_MODE
- set_sql = sqlite3_mprintf("media_display_name=%Q, media_description=%Q, media_longitude=%f, media_latitude=%f, media_file_name_pinyin=%Q, media_description_pinyin=%Q, played_count=%d, last_played_time=%d, last_played_position=%d, media_rating=%d, media_favourite=%d",
- _media->display_name, _media->description, _media->longitude, _media->latitude, file_name_pinyin, description_pinyin, _media->played_count, _media->played_time, _media->played_position, _media->rating, _media->favourite);
-#else
- set_sql = sqlite3_mprintf("media_display_name=%Q, media_description=%Q, media_longitude=%f, media_latitude=%f, media_file_name_pinyin=%Q, media_description_pinyin=%Q, media_rating=%d, media_favourite=%d", _media->display_name, _media->description, _media->longitude, _media->latitude, file_name_pinyin, description_pinyin, _media->rating, _media->favourite);
-#endif