Fix cover art sizing with explicit width/height styles

This commit is contained in:
david.alvarez
2026-07-02 21:52:35 +02:00
parent 15c153c56a
commit 6bbc85a93a
2 changed files with 14 additions and 2 deletions
@@ -79,6 +79,8 @@ public class RSSFeedBuilder {
private String buildDescription(ReleaseGroup rg) {
var sb = new StringBuilder();
sb.append("<img src=\"https://coverartarchive.org/release-group/")
.append(rg.mbid()).append("/front\" alt=\"Cover\">");
sb.append("<p><b>").append(escHtml(rg.artistName())).append("</b>")
.append(" <i>").append(escHtml(rg.title())).append("</i><br>");
sb.append("Type: ").append(escHtml(rg.primaryType()));
@@ -86,8 +88,6 @@ public class RSSFeedBuilder {
sb.append(" | Secondary: ").append(escHtml(rg.secondaryTypes()));
}
sb.append("<br>First Release Date: ").append(rg.firstReleaseDate());
sb.append("<br><a href=\"https://coverartarchive.org/release-group/")
.append(rg.mbid()).append("/front\">Cover Art</a>");
sb.append("</p>");
return sb.toString();
}
@@ -8,6 +8,7 @@
<table class="table table-zebra">
<thead>
<tr>
<th>Cover</th>
<th>Artist</th>
<th>Release</th>
<th>Type</th>
@@ -17,6 +18,17 @@
<tbody>
{#for entry in entries}
<tr>
<td>
<a href="https://musicbrainz.org/release-group/{entry.mbid}"
target="_blank" rel="noopener noreferrer">
<img src="https://coverartarchive.org/release-group/{entry.mbid}/front"
alt="Cover"
width="48" height="48"
style="width:48px;height:48px;object-fit:cover;border-radius:6px"
loading="lazy"
onerror="this.src='data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 48 48%22><rect width=%2248%22 height=%2248%22 fill=%22%23333%22/><text x=%2224%22 y=%2230%22 text-anchor=%22middle%22 fill=%22%23999%22 font-size=%2210%22>No Art</text></svg>'">
</a>
</td>
<td class="font-medium">{entry.artistName}</td>
<td>
<a href="https://musicbrainz.org/release-group/{entry.mbid}"