mirror of
https://github.com/rembo10/headphones.git
synced 2026-07-22 00:44:00 +01:00
Don't keep retrying CCA image
This commit is contained in:
@@ -38,7 +38,7 @@
|
|||||||
%>
|
%>
|
||||||
<tr class="grade${grade}">
|
<tr class="grade${grade}">
|
||||||
%if type == 'album':
|
%if type == 'album':
|
||||||
<td id="albumart" style=" text-align: center; vertical-align: middle;"><div id="artistImg"><img title="${result['albumid']}" class="albumArt" height="50" width="50" onerror="this.src='${caa_group_url}'"></div></td>
|
<td id="albumart" style=" text-align: center; vertical-align: middle;"><div id="artistImg"><img title="${result['albumid']}" class="albumArt" height="50" width="50" onerror="tryCCA('${caa_group_url}')"></div></td>
|
||||||
%else:
|
%else:
|
||||||
<td id="albumart"><div id="artistImg"><img title="${result['id']}" class="albumArt" height="50" width="50"></div></td>
|
<td id="albumart"><div id="artistImg"><img title="${result['id']}" class="albumArt" height="50" width="50"></div></td>
|
||||||
%endif
|
%endif
|
||||||
@@ -72,12 +72,22 @@
|
|||||||
<script src="js/libs/jquery.dataTables.min.js"></script>
|
<script src="js/libs/jquery.dataTables.min.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function tryCCA(url) {
|
||||||
|
var image = $(this);
|
||||||
|
|
||||||
|
if (!image.hasClass('done')) {
|
||||||
|
image.addClass('done');
|
||||||
|
image.onerror = null;
|
||||||
|
this.src = url;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function getArt() {
|
function getArt() {
|
||||||
$("table#searchresults_table tr td#albumart img").each(function(){
|
$("table#searchresults_table tr td#albumart img").each(function(){
|
||||||
var id = $(this).attr('title');
|
var id = $(this).attr('title');
|
||||||
var image = $(this);
|
var image = $(this);
|
||||||
|
|
||||||
if ( !image.hasClass('done') ) {
|
if (!image.hasClass('done')) {
|
||||||
image.addClass('done');
|
image.addClass('done');
|
||||||
getImageLinks(image, id, "${type}", true);
|
getImageLinks(image, id, "${type}", true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user