From 167a55591b46a1c65dc62bb06758c5778834c221 Mon Sep 17 00:00:00 2001 From: martin Date: Tue, 17 May 2011 14:55:37 -0400 Subject: [PATCH] -top panel js regression fix. (Error when recording show finished) --- .../public/js/airtime/dashboard/playlist.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/airtime_mvc/public/js/airtime/dashboard/playlist.js b/airtime_mvc/public/js/airtime/dashboard/playlist.js index 1b2177a1e..cb786a200 100644 --- a/airtime_mvc/public/js/airtime/dashboard/playlist.js +++ b/airtime_mvc/public/js/airtime/dashboard/playlist.js @@ -62,7 +62,7 @@ function updateProgressBarValue(){ if (showPercentDone < 0 || showPercentDone > 100){ showPercentDone = 0; currentShow = new Array(); - currentSong = new Array(); + currentSong = null; } } $('#progress-show').attr("style", "width:"+showPercentDone+"%"); @@ -131,13 +131,7 @@ function updatePlaybar(){ else $('#current').text(currentSong.name+","); } - /* - else if (currentShow.length > 0){ - if (currentShow[0].record == "1"){ - $('#current').html("Current: Recording"); - } - } - * */ + if (nextSong !== null){ $('#next').text(nextSong.name+","); $('#next-length').text(convertToHHMMSSmm(nextSong.songLengthMs)); @@ -149,8 +143,8 @@ function updatePlaybar(){ $('#time-remaining').empty(); $('#song-length').empty(); if (currentSong !== null){ - $('#start').text(currentSong.starts.substring(currentSong.starts.indexOf(" ")+1)); - $('#end').text(currentSong.ends.substring(currentSong.starts.indexOf(" ")+1)); + $('#start').text(currentSong.starts.split(' ')[1]); + $('#end').text(currentSong.ends.split(' ')[1]); /* Get rid of the millisecond accuracy so that the second counters for both * show and song change at the same time. */