mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 04:39:57 +00:00
Returning 1200px album arts for MusicBrainz, large obj only for fallback
This commit is contained in:
parent
a3864007a0
commit
11ec1926cb
@ -37,7 +37,8 @@ function saveUsers() {
|
||||
async function getFromMusicBrainz(mbid) {
|
||||
try {
|
||||
const response = await axios.get(`https://coverartarchive.org/release/${mbid}`);
|
||||
const imageUrl = response.data.images[0]?.thumbnails?.large || '';
|
||||
const imageUrlLarge = response.data.images[0]?.thumbnails?.large;
|
||||
const imageUrl = response.data.images[0]?.thumbnails?.['1200'] || imageUrlLarge || '';
|
||||
return imageUrl;
|
||||
} catch (error) {
|
||||
return undefined;
|
||||
|
Loading…
x
Reference in New Issue
Block a user