Kalimehtar / binary-class-mp3

MP3 ID3v2 library
MIT License
4 stars 1 forks source link

Editing? #3

Open jackfirth opened 7 years ago

jackfirth commented 7 years ago

I'd like to write a quick script / tool to edit ID3 tag values in MP3 files. This package can read the tags, but not edit them. Would adding that to this package be appropriate? It looks like binary-class supports writing as well as reading, so hopefully it's relatively straightforward to implement.

Kalimehtar commented 7 years ago

It can edit. You may edit id3. Take list of frames via (get-field id3 frames). Then edit via (set-field! ... frame ...). To overwrite use (write-value id3-tag% out id3).

I may add some helper functions, but I don't know, what API would be useful. If you know, tell me.

I can't simply make (set-song! id3 value), because song may be written in "TT2" or "TIT2" frame. Besides, I don't sure, if it is good to decrease size of frame, if new string is shorter, than former.