Made the album search 10x faster. We are now loading the images in a seperate call. #32

This commit is contained in:
tidusjar 2016-04-04 11:35:40 +01:00
commit 9211f3db4f
3 changed files with 12 additions and 4 deletions

View file

@ -244,6 +244,7 @@ $(function () {
var html = musicTemplate(context);
$("#musicList").append(html);
getCoverArt(context.id);
});
}
else {
@ -253,6 +254,14 @@ $(function () {
});
};
function getCoverArt(artistId) {
$.ajax("/search/music/coverart/" + artistId).success(function (result) {
if (result) {
$('#' + artistId + "imageDiv").html(" <img class='img-responsive' src='" + result + "' width='150' alt='poster'>");
}
});
};
function buildMovieContext(result) {
var date = new Date(result.releaseDate);
var year = date.getFullYear();