Added album info change stuff

This commit is contained in:
gballan1 committed 2016-11-28 21:23:55 -05:00
1 parent 9aff68ca86
commit b6915c242d
3 files changed
+21 -6

No files matched your search

+15
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);