fix no content issue when get pvr list 73/205573/1 accepted/tizen/unified/20190508.234045 submit/tizen/20190508.054311
authoryujie.cheng <yujie.cheng@samsung.com>
Tue, 7 May 2019 11:41:47 +0000 (19:41 +0800)
committeryujie.cheng <yujie.cheng@samsung.com>
Tue, 7 May 2019 11:41:47 +0000 (19:41 +0800)
Change-Id: I2f208bd2dec8b49941cae6267e618a32a603378e

include_product/media_info_private.h

index f555acb..b803b11 100755 (executable)
@@ -694,14 +694,14 @@ typedef struct _media_content_scan_cb_data_v2 {
 #define UPDATE_MEDIA_INFO_IN_FACE_SCAN_LIST    "UPDATE "DB_TABLE_FACE_SCAN_LIST" SET modified_time = 0 WHERE media_id IN (SELECT media_id FROM "DB_TABLE_FACE" WHERE media_face_id=%d)"
 #define SELECT_FACE_ID                 "SELECT media_face_id FROM "DB_TABLE_FACE" WHERE media_id='%q' AND face_rect_x=%d AND face_rect_y=%d AND face_rect_w=%d AND face_rect_h=%d AND face_orientation=%d"
 
-#define SELECT_VALID_STORAGE_FROM_PVR  "WHERE storage_id IN (SELECT storage_id FROM "DB_TABLE_STORAGE" WHERE validity=1)"
+#define SELECT_VALID_STORAGE_FROM_PVR  "WHERE storage_uuid IN (SELECT storage_id FROM "DB_TABLE_STORAGE" WHERE validity=1)"
 #define SELECT_PVR_COUNT                                       "SELECT COUNT(*) FROM "DB_TABLE_PVR" "SELECT_VALID_STORAGE_FROM_PVR
 #define SELECT_PVR_LIST                                        "SELECT * FROM "DB_TABLE_PVR" "SELECT_VALID_STORAGE_FROM_PVR
 #define SELECT_PVR_COUNT_BY_STORAGE_ID SELECT_PVR_COUNT" AND storage_uuid='%s'"
 #define SELECT_PVR_LIST_BY_STORAGE_ID          SELECT_PVR_LIST" AND storage_uuid='%s'"
 #define SELECT_PVR_FROM_PVR                            "SELECT * FROM "DB_TABLE_PVR" WHERE media_id='%q'"
 #define UPDATE_PVR_META_FROM_PVR               "UPDATE "DB_TABLE_PVR" SET program_title=%Q, content_lock=%d, content_watch=%d, play_count=%d, highlight=%d WHERE media_id='%q'"
-#define UPDATE_PVR_LOCAL_RECORD_PVR            "UPDATE "DB_TABLE_PVR" SET is_local_record=%d WHERE path='%q' AND storage_uuid='%q'"
+#define UPDATE_PVR_LOCAL_RECORD_PVR            "UPDATE "DB_TABLE_PVR" SET is_local_record=%d WHERE media_path='%q' AND storage_uuid='%q'"
 
 #define SELECT_PVR_GROUP_LIST                                          "SELECT DISTINCT %s FROM "DB_TABLE_PVR" "SELECT_VALID_STORAGE_FROM_PVR
 #define SELECT_PVR_GROUP_LIST_BY_STORAGE_ID            "SELECT DISTINCT %s FROM "DB_TABLE_PVR" WHERE storage_uuid='%s'"
@@ -718,7 +718,7 @@ typedef struct _media_content_scan_cb_data_v2 {
 #define SELECT_PVR_GROUP_AND_COUNT_BY_STORAGE_ID               "SELECT %s, COUNT(*) FROM "DB_TABLE_PVR" WHERE storage_uuid='%s'"
 #define SELECT_PVR_GROUP_AND_COUNT                                             "SELECT %s, COUNT(*) FROM "DB_TABLE_PVR" "SELECT_VALID_STORAGE_FROM_PVR
 
-#define SELECT_VALID_STORAGE_FROM_UHD  "WHERE storage_id IN (SELECT storage_id FROM "DB_TABLE_STORAGE" WHERE validity=1)"
+#define SELECT_VALID_STORAGE_FROM_UHD  "WHERE storage_uuid IN (SELECT storage_id FROM "DB_TABLE_STORAGE" WHERE validity=1)"
 #define SELECT_UHD_GROUP_LIST                                          "SELECT DISTINCT %s FROM "DB_TABLE_UHD" "SELECT_VALID_STORAGE_FROM_UHD
 #define SELECT_UHD_GROUP_LIST_BY_STORAGE_ID            "SELECT DISTINCT %s FROM "DB_TABLE_UHD" WHERE storage_uuid='%s'"
 #define SELECT_UHD_GROUP_COUNT                                 "SELECT COUNT(*) FROM ("SELECT_UHD_GROUP_LIST