CC-3737: ON AIR turns to grey from time to time, while the stream keeps playing

-fixed
This commit is contained in:
denise 2012-05-16 12:54:02 -04:00
parent fd70768910
commit 1629f41a8d
2 changed files with 4 additions and 2 deletions

View File

@ -78,16 +78,18 @@ function updateProgressBarValue(){
$('#progress-show').attr("style", "width:"+showPercentDone+"%");
var songPercentDone = 0;
var songElapsedTime = 0;
var scheduled_play_div = $("#scheduled_play_div");
var scheduled_play_line_to_switch = scheduled_play_div.parent().find(".line-to-switch");
if (currentSong !== null){
songPercentDone = (estimatedSchedulePosixTime - currentSong.songStartPosixTime)/currentSong.songLengthMs*100;
songElapsedTime = estimatedSchedulePosixTime - currentSong.songStartPosixTime;
if (songPercentDone < 0 || songPercentDone > 100){
songPercentDone = 0;
currentSong = null;
} else {
if (currentSong.media_item_played == true && currentShow.length > 0){
if ( (currentSong.media_item_played == true && currentShow.length > 0) || songElapsedTime < 5000 ){
scheduled_play_line_to_switch.attr("class", "line-to-switch on");
scheduled_play_div.addClass("ready");
scheduled_play_source = true;

View File

@ -202,7 +202,7 @@ class PypoPush(Thread):
for queue_item in liquidsoap_queue_approx:
if queue_item['start'] in media_schedule.keys():
media_item = media_schedule[queue_item['start']]
if queue_item['id'] == media_item['id']:
if queue_item['row_id'] == media_item['row_id']:
if queue_item['end'] == media_item['end']:
#Everything OK for this iteration.
pass