feat(19-01): implement WAV RIFF parser/writer and writeWavTags
- Add FormatWAV constant and .wav DetectFormat case - Add FormatWAV dispatch in pipeline WriteTrackTags switch - Create wav.go with custom RIFF chunk parser/writer - parseRIFF: lenient read, RF64 rejection, case-insensitive ID3 chunk detection - writeRIFF: strict write with correct padding and 4GB size check - writeWavTags: merge existing ID3v2, reuse applyTextChanges/applyCoverArtChanges - Atomic write via fileutil.AtomicWrite for crash safety
This commit is contained in:
@@ -144,6 +144,8 @@ func (tw *TagWriter) WriteTrackTags(trackID int64, changes TagChanges) error {
|
||||
err = writeMp3Tags(tw.logger, audioFile.FilePath, changes)
|
||||
case FormatFLAC:
|
||||
err = writeFlacTags(tw.logger, audioFile.FilePath, changes)
|
||||
case FormatWAV:
|
||||
err = writeWavTags(tw.logger, audioFile.FilePath, changes)
|
||||
default:
|
||||
err = fmt.Errorf("%w: %s", errUnsupportedFormat, format)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user