summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-08-24 14:46:44 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2011-08-24 14:46:44 +0200
commit3a89720aac71d32b0be5cc8893779d2b382391a3 (patch)
tree76315587544c832a1fdbb8cd80b9ff4f565c530d
parent38bbce52008ac02e0dd691d5f3c873b85a7ffd4f (diff)
Fixed progressing in song queue.
-rw-r--r--static/playlist.js6
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();