Skip to content

Instantly share code, notes, and snippets.

@vrutkovs
Forked from shivanipods/gist:5757950
Last active December 18, 2015 08:59
Show Gist options
  • Save vrutkovs/5757956 to your computer and use it in GitHub Desktop.
Save vrutkovs/5757956 to your computer and use it in GitHub Desktop.
loadNextTrack: function(){
this.load_next_track_lock = true;
if (!this.playlist || !this.currentTrack || !this.playlist.iter_next(this.currentTrack)) {
if (RepeatType.ALL == this.repeat) {
this.currentTrack = this.playlist.get_iter_first()[1];
} else {
this.currentTrack = null;
}
} else {
this.load( this.playlist.get_value( this.currentTrack, this.playlistField), false);
this.play();
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment