From 3072d7f9cf72358aa06a46ae008ad2308dcc044c Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Mon, 21 Oct 2024 10:41:10 +0800 Subject: [PATCH] fix: only fetch when not embedded --- ncmcrypt/ncmcrypt.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ncmcrypt/ncmcrypt.go b/ncmcrypt/ncmcrypt.go index 2579745..9158a74 100644 --- a/ncmcrypt/ncmcrypt.go +++ b/ncmcrypt/ncmcrypt.go @@ -161,7 +161,8 @@ func (ncm *NeteaseCloudMusic) Dump(targetDir string) (bool, error) { // FixMetadata will fix the missing metadata for target music file, the source of the metadata comes from origin ncm file. // Since NeteaseCloudMusic version 3.0, the album cover image is no longer embedded in the ncm file. If the parameter is true, it means downloading the image from the NetEase server and embedding it into the target music file (network connection required) func (ncm *NeteaseCloudMusic) FixMetadata(fetchAlbumImageFromRemote bool) (bool, error) { - if fetchAlbumImageFromRemote { + // only fetch album image from remote when it's not embedded in the ncm file + if len(ncm.mImageData) <= 0 && fetchAlbumImageFromRemote { // get the album pic from url resp, err := http.Get(ncm.mAlbumPicUrl) if err != nil {