diff --git a/ui/src/subsonic/index.js b/ui/src/subsonic/index.js index d0aab8534..9f0ad28d7 100644 --- a/ui/src/subsonic/index.js +++ b/ui/src/subsonic/index.js @@ -81,10 +81,6 @@ const getAvatarUrl = (username, size) => ) const getCoverArtUrl = (record, size, square) => { - // Known-absent art would only ever return a placeholder; skip the round trip entirely. - if (record.imageAbsent) { - return '' - } const suffix = record.imageHash ? '_' + record.imageHash : '' const options = { // A hash-suffixed url is already pixel-versioned; the buster would defeat immutable caching. diff --git a/ui/src/subsonic/index.test.js b/ui/src/subsonic/index.test.js index 27fbd0c2c..32c699a41 100644 --- a/ui/src/subsonic/index.test.js +++ b/ui/src/subsonic/index.test.js @@ -151,14 +151,15 @@ describe('getCoverArtUrl', () => { expect(url).toContain('_=') }) - it('returns an empty url for known-absent artwork', () => { - expect( - subsonic.getCoverArtUrl({ - id: 'album-123', - albumArtist: 'AA', - imageAbsent: true, - }), - ).toBe('') + it('still builds a url for known-absent artwork so the server placeholder renders', () => { + // Returning '' here made render as a broken icon; the server serves a + // proper placeholder for absent art, so the client must still request it. + const url = subsonic.getCoverArtUrl({ + id: 'album-123', + albumArtist: 'AA', + imageAbsent: true, + }) + expect(url).toContain('al-album-123') }) })