From 2923f01cd9a702c4977947b9238ccaf79bbffd40 Mon Sep 17 00:00:00 2001 From: Deluan Date: Tue, 20 Dec 2022 19:16:25 -0500 Subject: [PATCH] Fix UI artwork id creation --- ui/src/subsonic/index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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 {