Merge branch 'fix/time_to_play' into 'master'

Fix time to play.

See merge request !7
This commit is contained in:
Jim Driessen
2017-06-01 15:02:22 +02:00

View File

@ -180,11 +180,6 @@ function renderQueue(playNextAt, now)
var canMoveDown = canDelete && id < queue.length - 1;
var artist = song.song.artist.trim() === '' ? '?' : song.song.artist;
var title = song.song.title.trim() === '' ? '?' : song.song.title;
if (firstSongInQueue === true) {
firstSongInQueue = false;
} else {
timeToPlay += song.song.duration;
}
showTime = showTimeToPlay ? (timeToPlay < 0 ? '' : timeToPlay.secondsToHHMMSS()) : (playNextAt < now ? '' : playNextAt.timestampToHHMMSS())
@ -199,6 +194,7 @@ function renderQueue(playNextAt, now)
+ song.id + ')"></a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="#" class="glyphicon glyphicon-trash'
+ (canDelete ? '' : ' invisible') + '" onclick="return cancelSong('
+ song.id + ')"></a></td></tr>');
timeToPlay += parseInt(song.song.duration);
if(playNextAt >= now)
{
playNextAt += parseInt(song.song.duration);