fixed cover fetching on certain albums
looks like deezer likes to return null on cover urls for no fucking reason thanks baguette devs
This commit is contained in:
parent
995645dcb5
commit
cedcae8900
File diff suppressed because one or more lines are too long
5
index.js
5
index.js
|
@ -152,8 +152,9 @@ async function track(id, format, access_token, tagging) {
|
|||
id3.setFrame('TDAT', split[2]+split[1])
|
||||
}
|
||||
|
||||
if (json.album.cover_xl !== undefined) {
|
||||
const cover = await fetch(json.album.cover_xl)
|
||||
if (json.md5_image !== "") {
|
||||
const url = `https://cdns-images.dzcdn.net/images/cover/${json.md5_image}/1000x1000-000000-80-0-0.jpg`
|
||||
const cover = await fetch(url)
|
||||
const coverBuffer = await cover.arrayBuffer()
|
||||
|
||||
id3.setFrame('APIC', {
|
||||
|
|
Loading…
Reference in New Issue