Fixed album changing process

This commit is contained in:
gballan1 2016-11-29 00:01:42 -05:00
parent 11e0377b36
commit 387c1b9c87

View File

@ -4,13 +4,13 @@ $(document).ready(function() {
player = $('#music-player').get(0);
// on music track click
$('.now-playing-list .music-track').on('click', function() {
$('.now-playing-list').on('click', 'music-track', function() {
// change selected track
changeSelectedTrack(this);
});
// on album art click
$('.music-album .thumbnail').on('click', function() {
$('.music-album').on('click', '.thumbnail', function() {
// change selected album
changeSelectedAlbum(this);
});
@ -60,11 +60,11 @@ function getAlbumSongs(albumElem) {
var songElem = $('<li></li>')
.addClass('music-track')
.data('trackid', song.id)
.data('title', song.title)
.data('album', song.album_id)
.data('order', song.track_order)
.data('path', song.audio_file);
.attr('data-trackid', song.id)
.attr('data-title', song.title)
.attr('data-album', song.album_id)
.attr('data-order', song.track_order)
.attr('data-path', song.audio_file);
if (i === 0) {
songElem.addClass('selected');