Merge branch 'master' of bitbucket.org:venbaittech/sparqapi

This commit is contained in:
VE10-Sanjeev 2023-04-25 09:58:34 +05:30
commit 6062c3f172
2 changed files with 16 additions and 16 deletions

View File

@ -9243,23 +9243,23 @@ class PD_Controller extends REST_Controller
if ($value['composition_id'] && $value['vsp'] != 'google') {
$res = $this->twlio->getCompositionStatus($value['composition_id']);
// if (count($res) && $res['status'] == 'completed') {
if (count($res) && $res['status'] == 'completed') {
// // $is_copied = $this->copyMediaFromTwiloToS3($pd_master_details, $value, $pd_category); // copy media from twlio s3 to our s3
// // $fields_to_update = array('twilo_status' => 'completed');
// // if ($is_copied) {
// // $fields_to_update['s3_copied'] = 1;
// // }
// $id = $this->PD_Model->updateRecords($fields_to_update, VIDEO_ROOM_INFO, array('video_room_info_id' => $value['video_room_info_id']));
// $is_copied = $this->copyMediaFromTwiloToS3($pd_master_details, $value, $pd_category); // copy media from twlio s3 to our s3
$fields_to_update = array('twilo_status' => 'completed');
// if ($is_copied) {
// $fields_to_update['s3_copied'] = 1;
// }
$id = $this->PD_Model->updateRecords($fields_to_update, VIDEO_ROOM_INFO, array('video_room_info_id' => $value['video_room_info_id']));
// if ($id) {
// if ($room_id) {
// $result_data = $is_copied;
// } else {
// $result_data++;
// }
// }
// }
if ($id) {
if ($room_id) {
$result_data = $is_copied;
} else {
$result_data++;
}
}
}
} else {
$room_status = $this->twlio->getRoomDataByRoomID($value['room_id']);
if ($room_status == 'completed') {

View File

@ -40,7 +40,7 @@ class video_grabber_helper
if($value['is_uploaded'] || $value['vsp'] == 'google'){$video_name = $value['composition_id'];}
$file_name = $video_name;
if($value['s3_copied'])
if($value['twilo_status'] == 'completed')
{
if($value['s3_copied'] == 1){
$final_key = 'pd'.$pd_master_details[0]['pd_id'].'/video/'.$file_name;