From 271c4fb9b58e52969612e36c1be0b7b47b64d85d Mon Sep 17 00:00:00 2001 From: Ellis Berner Date: Sat, 3 Mar 2012 14:45:19 -0800 Subject: [PATCH] Get cover art --- js/app.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/app.js b/js/app.js index f345145..2eb8624 100644 --- a/js/app.js +++ b/js/app.js @@ -329,6 +329,7 @@ function playSong(el, songid, albumid) { title = child.title; artist = child.artist; album = child.album; + coverart = child.coverArt; } }); } @@ -337,8 +338,8 @@ function playSong(el, songid, albumid) { $('#songdetails_song').attr('parentid', albumid); $('#songdetails_song').attr('childid', songid); $('#songdetails_artist').html(artist + ' - ' + album); - $('#coverartimage').attr('href', baseURL + '/getCoverArt.view?v=1.6.0&c=' + applicationName + '&f=json&id=' + songid); - $('#coverartimage img').attr('src', baseURL + '/getCoverArt.view?v=1.6.0&c=' + applicationName + '&f=json&size=56&id=' + songid); + $('#coverartimage').attr('href', baseURL + '/getCoverArt.view?v=1.6.0&c=' + applicationName + '&f=json&id=' + coverart); + $('#coverartimage img').attr('src', baseURL + '/getCoverArt.view?v=1.6.0&c=' + applicationName + '&f=json&size=56&id=' + coverart); audio.load(baseURL + '/stream.view?v=1.6.0&c=' + applicationName + '&f=json&id=' + songid); audio.play(); $('table.songlist tr.song').removeClass('playing'); @@ -375,7 +376,7 @@ function rateSong(songid, rating) { req.setRequestHeader('Authorization', auth); }, success: function () { - updateMessage('Rating Updated!'); + updateMessage('Rating Updated!'); } }); } @@ -544,7 +545,7 @@ function addChatMessage(msg) { }, success: function () { updater.reset(); - //loadChatMessages(); + //loadChatMessages(); }, traditional: true // Fixes POST with an array in JQuery 1.4 }); @@ -894,7 +895,7 @@ function findKeyForCode(code) { }); return keyFound; } -function popOut() +function popOut() { window.open(hostURL, "External Player", "status = 1, height = 735, width = 840, resizable = 0") } @@ -921,4 +922,4 @@ function updateMessage(msg) { $('#messages').text(msg); $('#messages').fadeIn() setTimeout(function () { $('#messages').fadeOut(); }, 5000); -} \ No newline at end of file +}