Skip to content

Commit f006b04

Browse files
committed
fix missing db create
1 parent 5bdbad7 commit f006b04

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bot/processMusic.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ func processMusic(musicID int, message tgbotapi.Message, bot *tgbotapi.BotAPI) (
293293
songInfo.ThumbFileID = audio.Audio.Thumbnail.FileID
294294
}
295295

296+
err = db.Create(&songInfo).Error // 写入歌曲缓存
297+
if err != nil {
298+
return err
299+
}
300+
296301
for _, f := range []string{cacheDir + "/" + fileName, resizePicPath, picPath} {
297302
err := os.Remove(f)
298303
if err != nil {

0 commit comments

Comments
 (0)