Skip to content

🎧 Your Personal Streaming Service

Fix UI artwork id creation

Deluan2923f01cd9a7
diff --git a/ui/src/subsonic/index.js b/ui/src/subsonic/index.js
index 9908ee442..6c10d590b 100644
--- a/ui/src/subsonic/index.js
+++ b/ui/src/subsonic/index.js
@@ -51,10 +51,8 @@ const getCoverArtUrl = (record, size) => {
...(size && { size }),
}
- const lastUpdate = Math.floor(Date.parse(record.updatedAt) / 1000).toString(
- 16
- )
- const id = record.id + '-' + lastUpdate
+ const lastUpdate = Math.floor(Date.parse(record.updatedAt) / 1000)
+ const id = record.id + '-' + Math.max(lastUpdate, 0).toString(16)
if (record.album) {
return baseUrl(url('getCoverArt', 'mf-' + id, options))
} else {