Merge pull request #563 from monochrome-music/copilot/fix-artist-page-fallback
Fix artist page: correct ServerAPI fallback URL and picture field
This commit is contained in:
commit
60635b3513
2 changed files with 3 additions and 8 deletions
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue