diff --git a/data/interfaces/default/searchresults.html b/data/interfaces/default/searchresults.html index 8fea4992..8731d75b 100644 --- a/data/interfaces/default/searchresults.html +++ b/data/interfaces/default/searchresults.html @@ -8,24 +8,24 @@ - + <%-- Changed ID to class --%> %if type == 'album': - - - - - - - + + + + + + - + + %else: - - - + + + %endif - + @@ -39,34 +39,55 @@ if type == 'album': albuminfo = 'Type: ' + result['rgtype'] + ', Country: ' + result['country'] + # Constructing CAA URL for fallback, will be used as data-src for unveiling caa_group_url = "http://coverartarchive.org/release-group/%s/front-250.jpg" %result['rgid'] + # MusicBrainz album art URL (assuming it's a direct link to the image) + # If result['image'] provides a direct image URL, use it. Otherwise, rely on CAA or generic. + # For this modernization, let's assume getAlbumArtURL is available or build a generic one. + # For now, will prioritize getImageLinks. %> %if type == 'album': - + %elif type == 'artist': - + %else: - + <%-- No artwork for series --%> %endif %if type == 'album': - - - - - - - - + + + + + + + + <%-- Move display:none to CSS if always hidden --%> %elif type == 'artist': - - - + + + %else: - - - - + + + + %endif %endfor @@ -77,37 +98,77 @@ <%def name="headIncludes()"> + ${parent.headIncludes()} <%-- Ensure parent head includes are kept --%> + <%def name="javascriptIncludes()"> + ${parent.javascriptIncludes()} <%-- Ensure parent javascript includes are kept --%> - -
Album NameArtist NameFormatTracksDateScoreAlbum NameArtist NameFormatTracksDateScoreArtist NameScoreArtist NameScoreSeries NameTypeScoreSeries NameTypeScore
<%-- Changed ID to class --%> +
+ <%-- Using data-src for lazy loading. onerror will handle the tryCCA fallback. --%> + + onerror="tryCCA(this, '${caa_group_url}', 'album')" + alt="Cover art for ${result['title']}" loading="lazy"> +
+
<%-- Changed ID to class --%> +
+ <%-- Assuming artists might also have an image, or it will be a generic icon. --%> + + onerror="this.onerror=null;this.src='interfaces/default/images/no-cover-art.png';" + alt="Image for ${result['uniquename']}" loading="lazy"> +
+
${result['title']}${result['uniquename']}${result['formats']}${result['tracks']}${result['date']}
${result['score']}
${result['title']}${result['uniquename']}${result['formats']}${result['tracks']}${result['date']}
${result['score']}
${result['uniquename']}
${result['score']}
${result['uniquename']}
${result['score']}
${result['uniquename']}${result['type']}
${result['score']}
${result['uniquename']}${result['type']}
${result['score']}