mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Made the album search 10x faster. We are now loading the images in a seperate call. #32
This commit is contained in:
parent
4e1a668d3c
commit
9211f3db4f
3 changed files with 12 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue