From d9216eafe5867b0206bd5fb67f89b95705d0dd2b Mon Sep 17 00:00:00 2001 From: James Moon Date: Tue, 26 Apr 2011 13:36:21 -0700 Subject: [PATCH] cc-2230:Overbooked show still palying Fixed. Assigning it to Martin for a review --- airtime_mvc/public/js/playlist/playlist.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/airtime_mvc/public/js/playlist/playlist.js b/airtime_mvc/public/js/playlist/playlist.js index eff1dfc42..6dc3faa85 100644 --- a/airtime_mvc/public/js/playlist/playlist.js +++ b/airtime_mvc/public/js/playlist/playlist.js @@ -74,6 +74,7 @@ function updateProgressBarValue(){ if (showPercentDone < 0 || showPercentDone > 100){ showPercentDone = 0; currentShow = new Array(); + currentSong = new Array(); } } $('#progress-show').attr("style", "width:"+showPercentDone+"%"); @@ -162,7 +163,6 @@ function updatePlaybar(){ $('#time-remaining').text(convertToHHMMSS(songEndRoughly - estimatedSchedulePosixTime)); $('#song-length').text(convertToHHMMSSmm(currentSong[i].songLengthMs)); } - /* Column 1 update */ $('#playlist').text("Current Show:"); var recElem = $('.recording-show'); @@ -205,14 +205,16 @@ function parseItems(obj){ $('#time-zone').text(obj.timezone); previousSongs = obj.previous; - currentSong = obj.current; nextSongs = obj.next; calcAdditionalData(previousSongs); - calcAdditionalData(currentSong); calcAdditionalData(nextSongs); currentShow = obj.currentShow; + if(currentShow.length > 0){ + currentSong = obj.current; + calcAdditionalData(currentSong); + } nextShow = obj.nextShow; calcAdditionalShowData(obj.currentShow);