From ef71d402e249eadcfc85edfa8b154e6296151f35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 17 Apr 2026 08:23:20 +0000 Subject: [PATCH] fix: correct artist page fallback URL and picture field Agent-Logs-Url: https://github.com/monochrome-music/monochrome/sessions/f6c0d1c5-5b9f-486a-a3c1-333a4bcb62c4 Co-authored-by: binimum <61615730+binimum@users.noreply.github.com> --- functions/artist/[id].js | 9 ++------- js/api.js | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/functions/artist/[id].js b/functions/artist/[id].js index 1c62591..e910f09 100644 --- a/functions/artist/[id].js +++ b/functions/artist/[id].js @@ -116,13 +116,8 @@ class ServerAPI { } async getArtistMetadata(id) { - try { - const response = await this.fetchWithRetry(`/artist/${id}`); - return await response.json(); - } catch { - const response = await this.fetchWithRetry(`/artist?id=${id}`); - return await response.json(); - } + const response = await this.fetchWithRetry(`/artist/?id=${id}`); + return await response.json(); } getArtistPictureUrl(id, size = '750') { diff --git a/js/api.js b/js/api.js index 0d6849f..74dcea7 100644 --- a/js/api.js +++ b/js/api.js @@ -1041,7 +1041,7 @@ export class LosslessAPI { const artist = { ...this.prepareArtist(rawArtist), - picture: rawArtist.picture || primaryData.cover || null, + picture: rawArtist.picture || null, name: rawArtist.name || 'Unknown Artist', };