mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 12:49: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) {
|
async function getFromMusicBrainz(mbid) {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get(`https://coverartarchive.org/release/${mbid}`);
|
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;
|
return imageUrl;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return undefined;
|
return undefined;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user