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>
This commit is contained in:
parent
4f57e42d26
commit
ef71d402e2
2 changed files with 3 additions and 8 deletions
|
|
@ -116,13 +116,8 @@ class ServerAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
async getArtistMetadata(id) {
|
async getArtistMetadata(id) {
|
||||||
try {
|
const response = await this.fetchWithRetry(`/artist/?id=${id}`);
|
||||||
const response = await this.fetchWithRetry(`/artist/${id}`);
|
|
||||||
return await response.json();
|
return await response.json();
|
||||||
} catch {
|
|
||||||
const response = await this.fetchWithRetry(`/artist?id=${id}`);
|
|
||||||
return await response.json();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getArtistPictureUrl(id, size = '750') {
|
getArtistPictureUrl(id, size = '750') {
|
||||||
|
|
|
||||||
|
|
@ -1041,7 +1041,7 @@ export class LosslessAPI {
|
||||||
|
|
||||||
const artist = {
|
const artist = {
|
||||||
...this.prepareArtist(rawArtist),
|
...this.prepareArtist(rawArtist),
|
||||||
picture: rawArtist.picture || primaryData.cover || null,
|
picture: rawArtist.picture || null,
|
||||||
name: rawArtist.name || 'Unknown Artist',
|
name: rawArtist.name || 'Unknown Artist',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue