mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 18:41:47 +00:00
fix: use HEAD instead of GET in songInfo.imageSrc validation step
Thanks to @daika7ana! Close #2766
This commit is contained in:
@ -142,7 +142,10 @@ const handleData = async (
|
||||
const thumbnails = videoDetails.thumbnail?.thumbnails;
|
||||
songInfo.imageSrc = thumbnails.at(-1)?.url.split('?')[0];
|
||||
|
||||
if (songInfo.imageSrc && !(await net.fetch(songInfo.imageSrc)).ok) {
|
||||
if (
|
||||
songInfo.imageSrc &&
|
||||
!(await net.fetch(songInfo.imageSrc, { method: 'HEAD' })).ok
|
||||
) {
|
||||
songInfo.imageSrc = thumbnails.at(-1)?.url;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user