diff options
author | Jiyong Min <jiyong.min@samsung.com> | 2018-04-20 14:32:42 +0900 |
---|---|---|
committer | Jiyong Min <jiyong.min@samsung.com> | 2018-04-20 14:37:56 +0900 |
commit | 55066d4beb2096889cca3f921c94101dad6a9352 (patch) | |
tree | 3c9bd1c983834f38e53e1973f3abfcbb8f1d2f05 | |
parent | c18e081789492ba88170355143faebec4b4843af (diff) | |
download | media-controller-55066d4beb2096889cca3f921c94101dad6a9352.tar.gz media-controller-55066d4beb2096889cca3f921c94101dad6a9352.tar.bz2 media-controller-55066d4beb2096889cca3f921c94101dad6a9352.zip |
Change 'index' column to 'playlist_index' due to syntax error andsubmit/tizen/20180419.225455accepted/tizen/unified/20180423.062727
add the column into enum
Change-Id: Ic5245360cb03ef4ccabb2cce936c958b62328afd
-rwxr-xr-x | src/media_controller_db.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/media_controller_db.c b/src/media_controller_db.c index 493347c..f4e47ed 100755 --- a/src/media_controller_db.c +++ b/src/media_controller_db.c @@ -31,6 +31,7 @@ typedef enum { MC_SERVER_FIELD_SERVER_STATE, MC_SERVER_FIELD_PLAYBACK_STATE, MC_SERVER_FIELD_PLAYBACK_POSITION, + MC_SERVER_FIELD_PLAYLIST_INDEX, MC_SERVER_FIELD_TITLE, MC_SERVER_FIELD_ARTIST, MC_SERVER_FIELD_ALBUM, @@ -275,7 +276,7 @@ int mc_db_update_playback_info(void *handle, const char *server_name, int playba mc_retvm_if(handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL"); mc_retvm_if(server_name == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "server_name is NULL"); - sql_str = sqlite3_mprintf("UPDATE '%q' SET playback_state=%d, playback_position=%llu, index=%Q;", server_name, playback_state, playback_position, index); + sql_str = sqlite3_mprintf("UPDATE '%q' SET playback_state=%d, playback_position=%llu, playlist_index=%Q;", server_name, playback_state, playback_position, index); ret = __mc_db_update_db(handle, sql_str); @@ -398,7 +399,7 @@ int mc_db_get_playback_info(void *handle, const char *server_name, mc_playback_h mc_retvm_if(server_name == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "server_name is NULL"); mc_retvm_if(playback == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "playback is NULL"); - sql_str = sqlite3_mprintf("SELECT playback_state, playback_position, index FROM '%q';", server_name); + sql_str = sqlite3_mprintf("SELECT playback_state, playback_position, playlist_index FROM '%q';", server_name); mc_retvm_if(!MC_STRING_VALID(sql_str), MEDIA_CONTROLLER_ERROR_INVALID_OPERATION, "SQL string is null"); ret = sqlite3_prepare_v2(db_handle, sql_str, strlen(sql_str), &stmt, NULL); @@ -610,7 +611,7 @@ int mc_db_create_server_table(void *handle, const char *server_name) server_state INTEGER DEFAULT 1, \ playback_state INTEGER DEFAULT 0, \ playback_position INTEGER DEFAULT 0, \ - index TEXT, \ + playlist_index TEXT, \ title TEXT, \ artist TEXT, \ album TEXT, \ |