Added album info change stuff

This commit is contained in:
gballan1
2016-11-28 21:23:55 -05:00
parent 9aff68ca86
commit b6915c242d
3 changed files with 21 additions and 6 deletions

View File

@ -29,6 +29,21 @@ function changeSelectedAlbum(albumElem) {
}
}
function getAlbumInfo(albumElem) {
albumElem = $(albumElem);
$.get('/apiv1/music/album-info/' + albumElem.data('albumid'), function(data) {
var json = $.parseJSON(data);
// change album artwork
$('#album-artwork').attr('src', json.album_art);
// change album title
$('#album-title').text(json.title);
// change album description
$('#album-description').text(json.description);
});
}
function changeSelectedTrack(trackElem) {
var oldSelected = $('.now-playing-list .music-track.selected');
var newSelected = $(trackElem);