diff --git a/airtime_mvc/public/js/airtime/dashboard/dashboard.js b/airtime_mvc/public/js/airtime/dashboard/dashboard.js index c9eb14be1..759f458a4 100644 --- a/airtime_mvc/public/js/airtime/dashboard/dashboard.js +++ b/airtime_mvc/public/js/airtime/dashboard/dashboard.js @@ -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; diff --git a/python_apps/pypo/pypopush.py b/python_apps/pypo/pypopush.py index b42cbfc58..147333d36 100644 --- a/python_apps/pypo/pypopush.py +++ b/python_apps/pypo/pypopush.py @@ -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