| | |
| | | audio := &models.Audio{} |
| | | isOk := true |
| | | // 判断文件类型是否为.mp3或.wav |
| | | if filepath.Ext(event.Name) == ".mp3" || filepath.Ext(event.Name) == ".wav" { |
| | | if strings.ToLower(filepath.Ext(event.Name)) == ".mp3" || strings.ToLower(filepath.Ext(event.Name)) == ".wav" { |
| | | isOk = audoF(event.Name, fileName, audio) && txtF(pair[name], audio) |
| | | } |
| | | if filepath.Ext(event.Name) == ".txt" { |
| | | if strings.ToLower(filepath.Ext(event.Name)) == ".txt" { |
| | | isOk = audoF(pair[name], filepath.Base(pair[name]), audio) && txtF(event.Name, audio) |
| | | } |
| | | if !isOk { |