mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 08:53:59 +01:00
Cache the ajax calls to the thumbnail urls
This commit is contained in:
@@ -8,6 +8,7 @@ function getThumb(imgElem,id,type) {
|
|||||||
// Get Data from the cache by Artist ID
|
// Get Data from the cache by Artist ID
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: thumbURL,
|
url: thumbURL,
|
||||||
|
cache: true,
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if ( data == "" ) {
|
if ( data == "" ) {
|
||||||
var imageUrl = "interfaces/default/images/no-cover-artist.png";
|
var imageUrl = "interfaces/default/images/no-cover-artist.png";
|
||||||
@@ -31,6 +32,7 @@ function getArtwork(imgElem,id,type) {
|
|||||||
// Get Data from the cache by Artist ID
|
// Get Data from the cache by Artist ID
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: artworkURL,
|
url: artworkURL,
|
||||||
|
cache: true;
|
||||||
success: function(data){
|
success: function(data){
|
||||||
if ( data == "" ) {
|
if ( data == "" ) {
|
||||||
var imageUrl = "interfaces/default/images/no-cover-artist.png";
|
var imageUrl = "interfaces/default/images/no-cover-artist.png";
|
||||||
@@ -54,6 +56,7 @@ function getInfo(elem,id,type) {
|
|||||||
// Get Data from the cache by ID
|
// Get Data from the cache by ID
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: infoURL,
|
url: infoURL,
|
||||||
|
cache: true,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
var summary = data.Summary;
|
var summary = data.Summary;
|
||||||
@@ -72,6 +75,7 @@ function getImageLinks(elem,id,type) {
|
|||||||
// Get Data from the cache by ID
|
// Get Data from the cache by ID
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: infoURL,
|
url: infoURL,
|
||||||
|
cache: true,
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function(data){
|
success: function(data){
|
||||||
var thumbnail = data.thumbnail;
|
var thumbnail = data.thumbnail;
|
||||||
|
|||||||
Reference in New Issue
Block a user