From 35664809996068aa9696703827e7383118db91a7 Mon Sep 17 00:00:00 2001 From: denise Date: Fri, 25 May 2012 17:25:46 -0400 Subject: [PATCH] CC-3888: Record Show: ON AIR light and scheduled Play will ON for several seconds when a record show starts -fixed --- airtime_mvc/application/models/Show.php | 4 ++++ airtime_mvc/public/js/airtime/dashboard/dashboard.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/application/models/Show.php b/airtime_mvc/application/models/Show.php index 57c505713..5486e6aa2 100644 --- a/airtime_mvc/application/models/Show.php +++ b/airtime_mvc/application/models/Show.php @@ -1782,6 +1782,7 @@ class Application_Model_Show { "end_timestamp"=>$rows[$i-1]['end_timestamp'], "starts"=>$rows[$i-1]['starts'], "ends"=>$rows[$i-1]['ends'], + "record"=>$rows[$i-1]['record'], "type"=>"show"); } @@ -1797,6 +1798,7 @@ class Application_Model_Show { "end_timestamp"=>$rows[$i+1]['end_timestamp'], "starts"=>$rows[$i+1]['starts'], "ends"=>$rows[$i+1]['ends'], + "record"=>$rows[$i+1]['record'], "type"=>"show"); } @@ -1817,6 +1819,7 @@ class Application_Model_Show { "end_timestamp"=>$rows[$i]['end_timestamp'], "starts"=>$rows[$i]['starts'], "ends"=>$rows[$i]['ends'], + "record"=>$rows[$i]['record'], "type"=>"show"); break; } @@ -1832,6 +1835,7 @@ class Application_Model_Show { "end_timestamp"=>$rows[$previousShowIndex]['end_timestamp'], "starts"=>$rows[$previousShowIndex]['starts'], "ends"=>$rows[$previousShowIndex]['ends'], + "record"=>$rows[$previousShowIndex]['record'], "type"=>"show"); } diff --git a/airtime_mvc/public/js/airtime/dashboard/dashboard.js b/airtime_mvc/public/js/airtime/dashboard/dashboard.js index 4f2293514..98a167238 100644 --- a/airtime_mvc/public/js/airtime/dashboard/dashboard.js +++ b/airtime_mvc/public/js/airtime/dashboard/dashboard.js @@ -83,7 +83,7 @@ function updateProgressBarValue(){ songPercentDone = 0; currentSong = null; } else { - if ((currentSong.media_item_played == true && currentShow.length > 0) || songElapsedTime < 5000) { + if ((currentSong.media_item_played == true && currentShow.length > 0) || (songElapsedTime < 5000 && currentShow[0].record != 1)) { scheduled_play_line_to_switch.attr("class", "line-to-switch on"); scheduled_play_div.addClass("ready"); scheduled_play_source = true;