feat: 添加常量 TempDir 并更新文件下载逻辑以支持跳过已存在文件的选项

This commit is contained in:
lixiangwuxian
2025-04-12 21:16:58 +08:00
parent b49b780da2
commit 7ba0f74b49
7 changed files with 20 additions and 13 deletions

View File

@@ -178,7 +178,7 @@ func getMyRecentScore(msg model.Message) (reply *model.Reply) {
wg.Add(1)
go func(songHash string) {
defer wg.Done()
filePath, err := util.DownloadFile(coverImageMap[songHash], "/tmp/qqbot")
filePath, err := util.DownloadFile(coverImageMap[songHash], "/tmp/qqbot", true)
if err != nil {
log.Printf("下载图片失败: %v", err)
return