diff --git a/lib/controller/getHistoryDay.php b/lib/controller/getHistoryDay.php index e7cdb2f..da5e197 100644 --- a/lib/controller/getHistoryDay.php +++ b/lib/controller/getHistoryDay.php @@ -22,7 +22,11 @@ if( count($JU) ){ foreach( $JU as $CP ){ //$QS = "SELECT * FROM `sessions` WHERE `final`='Y' AND `track_id` IN (SELECT DISTINCT `id` FROM `metro_tracks` AND `platform_id` IN ( SELECT DISTINCT `id` FROM `metro_platforms` WHERE `station_id`={$STT} )) ORDER BY `ts`*1000+`ts_ms`"; - $QS = "SELECT * FROM `sessions` WHERE `ts` >= {$STS} AND `ts` <= {$ETS} AND `final`='Y' AND `track_id` IN ( SELECT DISTINCT `id` FROM `metro_tracks` WHERE `platform_id`={$CP['id']}) ORDER BY `ts`*1000+`ts_ms`"; + /* Fixing Ongoing session to be viewed + $QS = "SELECT * FROM `sessions` WHERE `ts` >= {$STS} AND `ts` <= {$ETS} AND `final`='Y' AND `track_id` IN ( SELECT DISTINCT `id` + FROM `metro_tracks` WHERE `platform_id`={$CP['id']}) ORDER BY `ts`*1000+`ts_ms`"; + */ + $QS = "SELECT * FROM `sessions` WHERE `ts` >= {$STS} AND `ts` <= {$ETS} AND `track_id` IN ( SELECT DISTINCT `id` FROM `metro_tracks` WHERE `platform_id`={$CP['id']}) ORDER BY `ts`*1000+`ts_ms`"; $RR = $DATABASE->Query( $QS ); $S = count( $RR ); $V = 0;//intval( $RR[0]['v'] ); diff --git a/lib/controller/getSessionData.php b/lib/controller/getSessionData.php index f3a8908..95d58fb 100644 --- a/lib/controller/getSessionData.php +++ b/lib/controller/getSessionData.php @@ -46,6 +46,7 @@ } else { $Data['composed_video_status'] = 'D'; $Data['composed_left_video_exists'] = file_exists('data/composed_videos/' . $RR[0]['uuid'].'_L.mp4' ); + $Data['composed_right_video_exists'] = file_exists('data/composed_videos/' . $RR[0]['uuid'].'_R.mp4' ); if( $Data['composed_left_video_exists'] ){ $CMD = "ffprobe -hide_banner ./data/composed_videos/{$RR[0]['uuid']}_L.mp4 2>&1"; $Zaza = `$CMD`; @@ -68,7 +69,6 @@ }; }; }; - $Data['composed_right_video_exists'] = file_exists('data/composed_videos/' . $RR[0]['uuid'].'_R.mp4' ); if( $Data['composed_right_video_exists'] ){ $CMD = "ffprobe -hide_banner ./data/composed_videos/{$RR[0]['uuid']}_R.mp4 2>&1"; $Zaza = `$CMD`; diff --git a/lib/javascript/jsapi_dynamic/argus_reports.js b/lib/javascript/jsapi_dynamic/argus_reports.js index 64cbdde..e37dd5f 100644 --- a/lib/javascript/jsapi_dynamic/argus_reports.js +++ b/lib/javascript/jsapi_dynamic/argus_reports.js @@ -729,15 +729,24 @@ function CompositeVideoStatusUpdate(){ oldCompositeVideoStatus = CompositeVideoStatus; switch( CompositeVideoStatus ){ case 0:{ - rr.add({ - xtype: 'panel', - frame: false, - border: false, - html: '
Compose Videos into one file
 
Start Video Composer
 
' - }); + if( mSesPlay.Videos.length > 1 ){ + rr.add({ + xtype: 'panel', + frame: false, + border: false, + html: '
Compose Videos into one file
 
 
' + }); + rr.doLayout(); + new Ext.Button({ + text: 'Start Video Composer', + width: '80%', + renderTo: 's_c_button', + handler: startVideoComposer + }); + }; break; }; - case 1:{ + case 1:{ rr.add({ border: false, frame: false, @@ -773,7 +782,7 @@ function CompositeVideoStatusUpdate(){ handler: function(){ const l = document.createElement('a'); l.style.display = 'none'; - l.href = '/lib/controller/getComposedVideo.php?SESSION='+rep_selectedEventId+'&SIDE=L'; + l.href = '/lib/controller/getComposedVideo.php?SESSION='+rep_selectedEventId+'&SIDE=R'; document.body.appendChild(l); l.click(); } @@ -1691,7 +1700,6 @@ class argusSessionPlayer{ sesVideosListLExists = false; } } else CompositeVideoStatus = 0; - if( data.events.length ){ mSesPlay.Events = data.events; for( var i=0; i < data.events.length; i++ ){ @@ -2141,7 +2149,6 @@ class argusSessionPlayer33{ //mSesPlay.rVideoJS = document.getElementById( 'video_obj_'+data.r_module_id ); //mSesPlay.lVideoJS = document.getElementById( 'video_obj_'+data.l_module_id ); mSesPlay.mMapID = document.getElementById( 'plat_map_'+data.track_id ); - //debugger; if( data.data_ok ){ mSesPlay.startTime = data.start_ts; mSesPlay.endTime = data.start_ts + data.length; @@ -2155,8 +2162,8 @@ class argusSessionPlayer33{ if( data.composed_video ){ if( data.composed_video_status == 'D' ){ CompositeVideoStatus = 2; - sesVideosListRExists = data.composed_right_video_exists; sesVideosListLExists = data.composed_left_video_exists; + sesVideosListRExists = data.composed_right_video_exists; if( sesVideosListLExists ) CompositeVideoLeftInfo = data.composed_left_info; else CompositeVideoLeftInfo = null; if( sesVideosListRExists ) CompositeVideoRightInfo = data.composed_right_info; else CompositeVideoRightInfo = null; } else {