From 3a89720aac71d32b0be5cc8893779d2b382391a3 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 24 Aug 2011 14:46:44 +0200 Subject: Fixed progressing in song queue. --- static/playlist.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/playlist.js b/static/playlist.js index 3590f2c..4b818d6 100644 --- a/static/playlist.js +++ b/static/playlist.js @@ -46,6 +46,8 @@ function Playlist(pl, audio) { // avoid breaking when a track has been removed while(nextsong && nextsong.childElementCount == 0) nextsong = nextsong.nextElementSibling; + if(nextsong && nextsong.getAttribute('class') == 'album') + nextsong = nextsong.nextElementSibling; if(nextsong) { var nexta = nextsong.getElementsByTagName('a')[0]; nexta.ml.recode(); @@ -184,8 +186,10 @@ function Playlist(pl, audio) { old.parentElement.removeChild(old); } // avoid breaking when a track has been removed - while(this.current && this.current.childElementCount == 0) + while(this.current && this.current.getAttribute('class') == 'album') { + log('next while loop'); this.current = this.current.nextElementSibling; + } if(this.current) { var a = this.current.getElementsByTagName('a')[0]; a.onclick(); -- cgit v1.2.3