diff options
-rw-r--r-- | static/playlist.js | 6 |
1 files changed, 5 insertions, 1 deletions
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(); |