From afd793a12da82fc240b40b0d6b45f6d416318075 Mon Sep 17 00:00:00 2001 From: "minje.ahn" Date: Wed, 12 Oct 2022 16:24:32 +0900 Subject: [PATCH] Change folder_id to row id instead of uuid Change to row id instead of uuid for manageability. Change-Id: Ic7f78f20980e72397ab55405fbc436f25cda1419 Signed-off-by: minje.ahn --- include/media_content_type.h | 4 ++-- include_product/media_content_type.h | 4 ++-- src/media_db.c | 5 ++++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/media_content_type.h b/include/media_content_type.h index d13d0ac..9923333 100755 --- a/include/media_content_type.h +++ b/include/media_content_type.h @@ -321,7 +321,7 @@ typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user * @param[in] update_item The update item of notification * @param[in] update_type The update type of notification * @param[in] media_type The type of the media content (#media_content_type_e) - * @param[in] uuid The UUID of media or directory, which is updated + * @param[in] uuid The ID of media or directory, which is updated * @param[in] path The path of the media or directory * @param[in] mime_type The MIME of the media info * @param[in] user_data The user data passed from the foreach function @@ -335,7 +335,7 @@ typedef void (*media_content_db_update_cb)( media_content_db_update_item_type_e update_item, media_content_db_update_type_e update_type, media_content_type_e media_type, - char *uuid, + char *id, char *path, char *mime_type, void *user_data); diff --git a/include_product/media_content_type.h b/include_product/media_content_type.h index 4066a59..2c7887c 100755 --- a/include_product/media_content_type.h +++ b/include_product/media_content_type.h @@ -381,7 +381,7 @@ typedef void (*media_scan_completed_cb)(media_content_error_e error, void * user * @param[in] update_item The update item of notification * @param[in] update_type The update type of notification * @param[in] media_type The type of the media content (#media_content_type_e) - * @param[in] uuid The UUID of media or directory, which is updated + * @param[in] uuid The ID of media or directory, which is updated * @param[in] path The path of the media or directory * @param[in] mime_type The MIME of the media info * @param[in] user_data The user data passed from the foreach function @@ -395,7 +395,7 @@ typedef void (*media_content_db_update_cb)( media_content_db_update_item_type_e update_item, media_content_db_update_type_e update_type, media_content_type_e media_type, - char *uuid, + char *id, char *path, char *mime_type, void *user_data); diff --git a/src/media_db.c b/src/media_db.c index f382923..e9a125f 100755 --- a/src/media_db.c +++ b/src/media_db.c @@ -670,8 +670,11 @@ int _media_db_get_folder(filter_h filter, media_folder_cb callback, void *user_d while (sqlite3_step(stmt) == SQLITE_ROW) { media_folder_s *_folder = g_new0(media_folder_s, 1); - +#ifdef _USE_TVPD_MODE _folder->folder_id = g_strdup((const char *)sqlite3_column_text(stmt, 0)); +#else + _folder->folder_id = g_strdup_printf("%lld", sqlite3_column_int64(stmt, 0)); +#endif _folder->path = g_strdup((const char *)sqlite3_column_text(stmt, 1)); _folder->name = g_strdup((const char *)sqlite3_column_text(stmt, 2)); _folder->storage_type = sqlite3_column_int(stmt, 3); -- 2.7.4